CSS 100%高度 [英] CSS 100% Height Div
本文介绍了CSS 100%高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
制作网站 http://nebkat.com/beta/index.php 并且有一个灰色背景和一个白色背景为内容(见为自己)。问题是我不能把白色部分设置为100%的高度。
Im making a website http://nebkat.com/beta/index.php and there is a grey background and a white background for content(see for yourself). The problem is that I cant set the white part to be 100% height. It only stays up to the title(Welcome...) and then it stops.
推荐答案
在%中指定的高度不会是
Heights specified in % will not be honored by the browser (edit: I mean to say they wont work the way you expect them to).
你需要一个清除div在你的 < div id =container>
div这里是您应该放置它的位置:
You need a clearing div inside your <div id="container">
div. Here is where you should place it:
<div id="container">
<div id="logo">...</div>
<div id="menu">...</div>
<div id="content">...</div>
<!-- HERE -->
<div style="clear: both;"></div>
</div>
这篇关于CSS 100%高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文