Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/78.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
Css div设置为100%不起作用_Css_Html - Fatal编程技术网

Css div设置为100%不起作用

Css div设置为100%不起作用,css,html,Css,Html,这是我的网站 我试图使菜单标签和colright div具有100%的高度,并将页脚div向下推到底部。但无论我做什么,都没用。我尝试过验证html,但只存在3个错误,这些错误没有那么重要。ami做错了什么?您需要使用(可能与表格单元格一起使用)或。您需要使用(可能与表格单元格一起使用)或。对于这种希望页脚始终出现在窗口底部的情况,我非常喜欢固定布局: header { position: fixed; top: 0; left: 0; width: 100%;

这是我的网站


我试图使菜单标签和colright div具有100%的高度,并将页脚div向下推到底部。但无论我做什么,都没用。我尝试过验证html,但只存在3个错误,这些错误没有那么重要。ami做错了什么?

您需要使用(可能与
表格单元格一起使用)或。

您需要使用(可能与
表格单元格一起使用)或。

对于这种希望页脚始终出现在窗口底部的情况,我非常喜欢固定布局:

header
{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 130px;
}

nav
{
    width: 960px;
    margin: 0 auto;
}

article
{
    top: 130px;
    bottom: 120px;
    left: 0;
    width: 100%;
    position: fixed;
    overflow: auto;
}

footer
{
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
}

我非常喜欢这种情况下的固定布局,您希望页脚始终显示在窗口底部:

header
{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 130px;
}

nav
{
    width: 960px;
    margin: 0 auto;
}

article
{
    top: 130px;
    bottom: 120px;
    left: 0;
    width: 100%;
    position: fixed;
    overflow: auto;
}

footer
{
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
}