最佳答案
我的 CSS 中有以下内容。所有的边距/填充/边框全局重置为0。
#wrapper{width: 75%; min-width: 800px;}
.content{text-align: justify; float: right; width: 90%;}
.lbar{text-align: justify; float: left; width: 10%;}
现在,当我将 HTML 编写为
<div id="wrapper">
<div class="content">
some text here
</div>
<div class="lbar">
some text here
</div>
</div>
页面呈现正确。但是,当我检查元素时,div#wrapper
显示为 0px
高。我希望它能扩展到 div.content
和 div.lbar
的末尾... ... 为什么会这样?
同样,页面显示良好。这种行为只是令我困惑。