Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/36.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
我想把内容放在一个容器中,容器的高度与屏幕的高度相同 我想把一个容器放在屏幕中间,放上一些div。 我想要这样的东西。 我为大家把html简化为基本内容 <!DOCTYPE HTML> <html lang="nl"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Webshop</title> <link href="../css/boilerplate.css" rel="stylesheet" type="text/css"> <style type="text/css"> #content { position:relative; width:200px; height:115px; background-color:#F00; top: 900px; margin:10px; padding:10px; display:inline-block; } #container { max-width: 960px; background: #FFF; margin: 0 auto; min-height:100%; height: auto; padding-top:0; padding-left:1em; padding-right:1em; padding-bottom:0; } </style> </head> <body style="background-color:#CF6" > <div id="container"> <div id="content"> </div> <div id="content"> </div> <div id="content"> </div> </div> </body> </html> 网店 #内容{ 位置:相对位置; 宽度:200px; 高度:115px; 背景色:#F00; 顶部:900px; 利润率:10px; 填充:10px; 显示:内联块; } #容器{ 最大宽度:960像素; 背景:#FFF; 保证金:0自动; 最小高度:100%; 高度:自动; 填充顶部:0; 左:1米; 右侧填充:1em; 填充底部:0; }_Html_Css - Fatal编程技术网

我想把内容放在一个容器中,容器的高度与屏幕的高度相同 我想把一个容器放在屏幕中间,放上一些div。 我想要这样的东西。 我为大家把html简化为基本内容 <!DOCTYPE HTML> <html lang="nl"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Webshop</title> <link href="../css/boilerplate.css" rel="stylesheet" type="text/css"> <style type="text/css"> #content { position:relative; width:200px; height:115px; background-color:#F00; top: 900px; margin:10px; padding:10px; display:inline-block; } #container { max-width: 960px; background: #FFF; margin: 0 auto; min-height:100%; height: auto; padding-top:0; padding-left:1em; padding-right:1em; padding-bottom:0; } </style> </head> <body style="background-color:#CF6" > <div id="container"> <div id="content"> </div> <div id="content"> </div> <div id="content"> </div> </div> </body> </html> 网店 #内容{ 位置:相对位置; 宽度:200px; 高度:115px; 背景色:#F00; 顶部:900px; 利润率:10px; 填充:10px; 显示:内联块; } #容器{ 最大宽度:960像素; 背景:#FFF; 保证金:0自动; 最小高度:100%; 高度:自动; 填充顶部:0; 左:1米; 右侧填充:1em; 填充底部:0; }

我想把内容放在一个容器中,容器的高度与屏幕的高度相同 我想把一个容器放在屏幕中间,放上一些div。 我想要这样的东西。 我为大家把html简化为基本内容 <!DOCTYPE HTML> <html lang="nl"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Webshop</title> <link href="../css/boilerplate.css" rel="stylesheet" type="text/css"> <style type="text/css"> #content { position:relative; width:200px; height:115px; background-color:#F00; top: 900px; margin:10px; padding:10px; display:inline-block; } #container { max-width: 960px; background: #FFF; margin: 0 auto; min-height:100%; height: auto; padding-top:0; padding-left:1em; padding-right:1em; padding-bottom:0; } </style> </head> <body style="background-color:#CF6" > <div id="container"> <div id="content"> </div> <div id="content"> </div> <div id="content"> </div> </div> </body> </html> 网店 #内容{ 位置:相对位置; 宽度:200px; 高度:115px; 背景色:#F00; 顶部:900px; 利润率:10px; 填充:10px; 显示:内联块; } #容器{ 最大宽度:960像素; 背景:#FFF; 保证金:0自动; 最小高度:100%; 高度:自动; 填充顶部:0; 左:1米; 右侧填充:1em; 填充底部:0; },html,css,Html,Css,结果糟透了。我真的不明白,你想要什么,但看看这个: }你可以用谷歌搜索绝对中心,结果太糟糕了。-这是一个主观的陈述。多谢各位,这真的很有帮助!有没有一种方法可以将容器一直延伸到页面底部,而不考虑内容?我所做的只是从“内容”中删除顶部和高度。不管怎样,如果你有你期望的结果,那就太好了。标记已接受的答案并继续;)非常感谢。 #content { position:relative; width:200px; background-color:#F00; margin:10px; padding:1

结果糟透了。

我真的不明白,你想要什么,但看看这个:


}

你可以用谷歌搜索绝对中心,结果太糟糕了。-这是一个主观的陈述。多谢各位,这真的很有帮助!有没有一种方法可以将容器一直延伸到页面底部,而不考虑内容?我所做的只是从“内容”中删除顶部和高度。不管怎样,如果你有你期望的结果,那就太好了。标记已接受的答案并继续;)非常感谢。
#content {
position:relative;
width:200px;
background-color:#F00;
margin:10px;
padding:10px;
display:inline-block;