Bootstrap 2.3 - div行之间不需要的垂直空间

时间:2014-06-04 20:00:30

标签: html css twitter-bootstrap

我使用的是Bootstrap 2.3和Foundation 5,并且都在页面上加载。没有Firebug错误。这是呈现的HTML和屏幕截图。为什么div行之间有这么多的垂直空间?

HTML:

   <div class="row-fluid">
           <div class="span3 offset2"><span id="makemeboldlbl" class="label label-warning">Genre</span></div>
           <div class="span3"><span id="makemeboldlbl" class="label label-warning">Manager</span></div>
           <div class="span3"><span id="makemeboldlbl" class="label label-warning">ts_update</span></div>
           <div class="span1">&nbsp;</div>
   </div>
   <div class='row-fluid'>
   <div class='span3 offset2'><a id='genre1' data-name='genre' data-type='text' data-pk='1' data-url='/updateGenre' data-title='Enter Genre'>American</a></div>
   <div class='span3'>jborn</div>
   <div class='span3'>0000-00-00 00:00:00</div>
   <div class='span1'><img src='./images/delete.png' id='delete_1' height='25' width='25' title='Remove' /></div>
   <div class='span2'>&nbsp</div>
</div>
<div class='row-fluid'>
   <div class='span3 offset2'><a id='genre2' data-name='genre' data-type='text' data-pk='2' data-url='/updateGenre' data-title='Enter Genre'>Asian</a></div>
   <div class='span3'>jborn</div>
   <div class='span3'>0000-00-00 00:00:00</div>
   <div class='span1'><img src='./images/delete.png' id='delete_2' height='25' width='25' title='Remove' /></div>
   <div class='span2'>&nbsp</div>
</div>


screenshot of the problem


这里更新了HTML:

<div class="row-fluid"><div class="span12 text-center"  id="genres">
   <div class="row-fluid">
           <div class="span2"><span id="makemeboldlbl" class="label label-warning">Genre</span></div>
           <div class="span2"><span id="makemeboldlbl" class="label label-warning">Manager</span></div>
           <div class="span3"><span id="makemeboldlbl" class="label label-warning">ts_update</span></div>
           <div class="span1">&nbsp;</div>
   </div>
   <? echo $data ?>
</div></div>


为什么在将标题居中并添加新表单时,它不会使行居中?
new problem: centering

1 个答案:

答案 0 :(得分:0)

尝试将span3更改为span2