Im有点新来CSS已经为我的html多年使用表,我试图找出如何嵌套div或将它们堆叠在3列布局的内容部分。与表我只是做一个新的<tr>
但如果我浮动另一个div到内容线行,它会出现平行或垂直,当我想出现在下面。有没有另一种方法来做到这一点,或者我在这里错过了Divs的重点?Stacking Div with CSS
基本示例代码
body {
margin: 0px;
padding: 0px;
}
#header {
background: #438a48;
width: 100%;
}
#leftcolumn {
background: #2675a8;
float: left;
width: 25%;
height: 700px;
}
#content {
background: #000;
float: left;
width: 75%;
height: 700px;
}
#footer {
background: #df781c;
clear: both;
width: 100%;
}
<div id="header">Header</div>
<div id="leftcolumn">Left Column</div>
<div id="content">Content</div>
<div id="footer">Footer</div>