2013-01-10 131 views
0
<div class="row"> 
    <div class="span4"> 
     <h2>Cele mai vandute</h2> 
    </div> 
    <div class="span10 offset1 well"> 
     <ul class="thumbnails"> 
      <li class="span2"> 
       <a href="#" class="thumbnail"><img data-src="holder.js/200x100" alt=""></a> 
      </li> 
      <li class="span2"> 
       <a href="#" class="thumbnail"><img data-src="holder.js/200x100" alt=""></a> 
      </li> 
      <li class="span2"> 
       <a href="#" class="thumbnail"><img data-src="holder.js/200x100" alt=""></a> 
      </li> 
      <li class="span2"> 
       <a href="#" class="thumbnail"><img data-src="holder.js/200x100" alt=""></a> 
      </li> 
      <li class="span2"> 
       <a href="#" class="thumbnail"><img data-src="holder.js/200x100" alt=""></a> 
      </li> 
      <li class="span2"> 
       <a href="#" class="thumbnail"><img data-src="holder.js/200x100" alt=""></a> 
      </li> 
      <li class="span2"> 
       <a href="#" class="thumbnail"><img data-src="holder.js/200x100" alt=""></a> 
      </li> 
      <li class="span2"> 
       <a href="#" class="thumbnail"><img data-src="holder.js/200x100" alt=""></a> 
      </li> 
      <li class="span2"> 
       <a href="#" class="thumbnail"><img data-src="holder.js/200x100" alt=""></a> 
      </li> 
      <li class="span2"> 
       <a href="#" class="thumbnail"><img data-src="holder.js/200x100" alt=""></a> 
      </li> 
     </ul> 
    </div> 
</div> 

你好,我在引導CSS的麻煩中心此跨度在一個容器類。 有人可以向我解釋如何在自舉中定位特別適用於跨度。非常感謝你css bootstrap嘰嘰喳喳集中跨度

+0

如果使用正常的引導,那麼你有太多的跨度,你的量共計15,當基本允許12.還你的問題是沒有意義的,你能解釋更多嗎? –

回答

1

你有它在bootstrap site解釋。

通常情況下,您的span s可以總計12(直到您customize it)。

而且使用的是<li>元素,而不是<div>,這是元素引導使用網格

一些調整你的代碼:

<div class="row"> 
    <div class="span2"> 
     <h2>Cele mai vandute</h2> 
    </div> 
    <div class="span10"> 
     <div class="row"> 
      <div class="span1"> 
       <a href="#" class="thumbnail"><img data-src="holder.js/200x100" alt=""></a> 
      </div> 
      <div class="span1"> 
       <a href="#" class="thumbnail"><img data-src="holder.js/200x100" alt=""></a> 
      </div> 
      <div class="span1"> 
       <a href="#" class="thumbnail"><img data-src="holder.js/200x100" alt=""></a> 
      </div> 
      <div class="span1"> 
       <a href="#" class="thumbnail"><img data-src="holder.js/200x100" alt=""></a> 
      </div> 
      <div class="span1"> 
       <a href="#" class="thumbnail"><img data-src="holder.js/200x100" alt=""></a> 
      </div> 
      <div class="span1"> 
       <a href="#" class="thumbnail"><img data-src="holder.js/200x100" alt=""></a> 
      </div> 
      <div class="span1"> 
       <a href="#" class="thumbnail"><img data-src="holder.js/200x100" alt=""></a> 
      </div> 
      <div class="span1"> 
       <a href="#" class="thumbnail"><img data-src="holder.js/200x100" alt=""></a> 
      </div> 
      <div class="span1"> 
       <a href="#" class="thumbnail"><img data-src="holder.js/200x100" alt=""></a> 
      </div> 
      <div class="span1"> 
       <a href="#" class="thumbnail"><img data-src="holder.js/200x100" alt=""></a> 
      </div> 
     </div> 
    </div> 
</div> 
+0

我使用了ul和li而不是div,因爲它在bootstrap網站上的示例中顯示了與ul和li ..不與div的 – Bogdan

0

我用來代替div的,因爲UL和李在自舉網站上的例子,它顯示與UL和李..不與div的 每行我可以有12個,之後,我需要在另一行再次工作,最多12?像這樣:

<div class="row"> 
<span class="9">...</div> 
<span class="3">...</div> 
</div> 
<div class="row"> 
<span class="9">...</div> 
<span class="3">...</div> 
+0

請使用[comments](http://stackoverflow.com/privileges/comment)。如果你有什麼要添加到你的問題,請點擊[這裏](http://stackoverflow.com/posts/14257530/edit)[編輯](http://stackoverflow.com/privileges/edit)。答案必須只是答案。 – lante