0
我试图在页面内容页面高度增加时将页脚向下推。但我无法做到这一点。页脚始终贴着侧栏。因为这是我的内容页面溢出页脚。页脚不会随着内容高度的增加而向下移动
我的CSS代码如下:
#header
{
height: 150px;
background-color: #375BB0;
}
#nav
{
**strong text**height: 100%;
width: 231px;
float: left;
}
#nav2
{
height: 100%;
width: 250px;
float: right;
}
#content
{
height: 100%;
bottom: 0;
}
#footer
{
clear: both;
height: 50px;
background-color: #CCCCCC;
color: #333333;
text-align: center;
}
我的标记代码:
<body>
<form id="form1" runat="server">
<div>
<div id="header">
</div>
<div id="nav">
<table class="style1" style="width: 100%; position: static ;" >
</table>
</div>
<div id="nav2">
<table style="border: 1px solid #000066; width: 100%; position: static;background-color:#9DAFD8;" >
</table>
</div>
<div id="content">
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
<div id="footer" style="clear: both; height:500px;" >
Copy rihgt @ xyzoman.com
</div>
</div>
</form>
请帮我
我想你的code.But仍无法工作的页脚会up.Thank你的你的回应 – FaisalThayyil
我很抱歉,但我在3个浏览器尝试这样做,它工作得很好,我用这个词上面写的确切代码换句话说,它的作品。如果它不工作,那么上面没有任何东西导致它。我会考虑像你可能在这篇文章中遗漏的其他div一样,还有什么其他div。我也会确保你在顶部有适当的文档类型。 –
你想要你的页脚? –