在下面顯示的標(biāo)記中,我試圖使內(nèi)容div一直延伸到頁面底部,但是只有在有要顯示的內(nèi)容時(shí)才拉伸。我要這樣做的原因是,即使沒有任何內(nèi)容要顯示,垂直邊框仍會(huì)在頁面下方顯示。這是我的HTML:<body> <form id="form1"> <div id="header"> <a title="Home" href="index.html" /> </div> <div id="menuwrapper"> <div id="menu"> </div> </div> <div id="content"> </div>而我的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;}
添加回答
舉報(bào)
0/150
提交
取消