我正在使用twitter引导程序,并希望在容器中的单行中有4个“如何工作”部分。根据twitter引导,在一个容器中,有12个跨,所以这不应该是一个问题。
由于某种原因,当我创建4 div时,它会导致第4 div转到下一行。我的屏幕宽度大于它应该垂直堆叠的宽度,所以这不是问题所在。
有什么想法吗?
CSS在这里
.howitworks{
text-align: center;
margin-top: 30px;
}
.howitworks p{
margin-left:20%;
padding-bottom: 40px;}
.howitworks h3{
padding-top:25px;
}
#howitworksdetail{
border: thin solid #0d9e49;
border-bottom-width: 3px;
border-bottom: solid #0d9e49;
min-height: 220px;
margin-top: 60px;
}HTML在这里
<div class = "container">
<div class = "howitworks">
<div class = 'span3', id= 'howitworksdetail'>
<h3 class = "text-center">header</h3>
<p class = "span2 text-center">stuff.</p>
</div>
<div class = 'span3', id= 'howitworksdetail'>
<h3 class = "text-center">header</h3>
<p class = "span2 text-center">stuff</p>
</div>
<div class = 'span3', id= 'howitworksdetail'>
<h3 class = "text-center">header</h3>
<p class = "span2 text-center">stuff</p>
</div>
<div class = 'span3', id= 'howitworksdetail'>
<h3 class = "text-center">header</h3>
<p class = "span2 text-center">stuff</p>
</div>
</div>
</div>我试图消除边界,但这也没有做到。谢谢
发布于 2014-04-20 00:48:08
看起来您的代码中缺少了<div class="row">。您将在自举网格系统页面上注意到,它需要类row才能创建包含这12列的行。
而且,您的<p>元素上有类<p>,但我相信您只想将网格类应用于<div>元素。希望这能有所帮助!
https://stackoverflow.com/questions/23177085
复制相似问题