div跳转html页面底部,即使没有内容,如何强制DIV块扩展到页面底部?
在下面顯示的標(biāo)記中,我試圖使內(nèi)容div一直延伸到頁面底部,但是只有在有要顯示的內(nèi)容時才拉伸。我要這樣做的原因是,即使沒有任何內(nèi)容要顯示,垂直邊框仍會在頁面下方顯示。
這是我的HTML:
而我的CSS:
body {
font-family: Trebuchet MS, Verdana, MS Sans Serif;
font-size:0.9em;
margin:0;
padding:0;
}
div#header {
width: 100%;
height: 100px;
}
#header a {
background-position: 100px 30px;
background: transparent url(site-style-images/sitelogo.jpg) no-repeat fixed 100px 30px;
height: 80px;
display: block;
}
#header, #menuwrapper {
background-repeat: repeat;
background-image: url(site-style-images/darkblue_background_color.jpg);
}
#menu #menuwrapper {
height:25px;
}
div#menuwrapper {
width:100%
}
#menu, #content {
width:1024px;
margin: 0 auto;
}
div#menu {
height: 25px;
background-color:#50657a;
}
總結(jié)
以上是生活随笔為你收集整理的div跳转html页面底部,即使没有内容,如何强制DIV块扩展到页面底部?的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Apicloud
- 下一篇: lm358在哪个库里_库里8和aj35哪