我正在尝试制作一个 3 列布局,但正如您从下面的屏幕截图中看到的那样,最左边和最右边的列并没有一直向下延伸:
您可以在http://codepen.io/vbelenky/pen/hvbEq找到代码,我也将其粘贴在这里:
<div class="wrapper">
<div class="primary">
<div class="primary-left">
Primary Left<br>
blah
</div>
<div class="primary-right">
Primary Right
</div>
</div>
<div class="secondary">
Secondary
</div>
</div>
CSS:
.wrapper {
overflow: hidden;
width: 600px;
border: 1px solid black;
}
.secondary {
width: 200px;
float: left;
background: cyan;
}
.primary {
width: 400px;
float: right;
}
.primary-left {
width: 300px;
float: left;
background: grey;
}
.primary-right {
width: 100px;
float: right;
background: yellow;
}