1
因此,這裏是我的代碼:DIV的高度CSS問題
#logo {
position:fixed;
color: white;
width: 100%;
padding: 5px;
left:0px;
top:0px;
height:50px;
width:100%;
background:#ffffff;
z-index: 1;
}
#page-container {
margin: auto;
width: 960px;
height: 100%!important;
background: #ffffff;
border-style: solid;
border-color: red;
}
html, body {
padding: 0;
}
body {
font-family: Arial, Helvetica, Verdana, Sans-serif;
font-size: 12px;
color: #000000;
background-color: #eef3f7;
}
#footer {
position:fixed!important;
position:absolute;
color: white;
clear: both;
width: 100%;
padding: 0;
left:0px;
bottom:0px;
height:30px;
background:#272695;
text-align:center;
}
我希望能夠讓頁腳了幾圈它一路走過來設置頁面容器高度。我得到的問題是這樣的:
我要的是有我的網頁內容規則來覆蓋整個頂部和底部沒有重疊。我在尋找沿此線的東西:
老實說,我已經試過各種我只是不知道是什麼問題。
你可以發佈你的HTML代碼嗎? – Eria
正如@Eria所說的,需要將您的html發佈到某處供我們查看。 –
很難理解你的目標是什麼,_「我希望能夠設置頁面容器的高度,以便頁腳完全覆蓋它。」_有點不清楚。你在問一個[sticky footer](http://ryanfait.com/sticky-footer/)嗎? – hungerstar