我有一个固定的标题和 260 像素的右侧。我有三列
,高度为 100%
。内容区域是一个 12 列宽的流体容器
。
<div class="header"></div>
<div class="secondary-aside"></div>
<div class="container">
<div class="row">
<div class="col-sm-4"></div>
<div class="col-sm-4"></div>
<div class="col-sm-4"></div>
</div>
</div>
下面是我正在研究的 fiddle 。 cols 的宽度与布局不符。
最佳答案
不是很清楚你所说的 The width of the cols are breaking with the layout.
这样试试:
html, body, .container {
height:100%;
width:100%; /*keep html and body 100% */
margin:0;
background:lightgray
}
.container {
display:table;
width:calc(100% - 260px);/*keep container 100% - 260px */
border-spacing:0.5em;
}
关于html - 容器宽度问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24776876/