2014-12-02 39 views
0

我是新手編程人員,難以調整引導程序網格以適合我的框架;我正在嘗試在左側做一個3列的側欄,然後在右側做一個9列的主側欄 - 但是在我輸入代碼後,它們每欄顯示爲12列。Bootstrap Grid,無法將它們分離爲期望的列空間

 <div class="content row"> 
     <?php include "_/components/php/snippet-carousel.php"; ?> 

     <section class="col-md-3 col-md-pull-9 sidebar"> 
    <?php include "_/components/php/aside-social.php"; ?> 
      </section><!-- sidebar --> 


      <section class="col-md-9 col-md-push-3 cont-grid"> 
     <?php include "_/components/php/weekend-intro.php"; ?>  
     <?php include "_/components/php/popular-categories.php"; ?>    
      </section><!-- main --> 

     </div><!-- content --> 
<?php include "_/components/php/footer.php"; ?> 
    </section><!-- container --> 
+0

無需拉。只需將'col-md-3'應用於側欄,並將'col-md-9 col-md-offset-3'應用於另一側。 – Abhitalks 2014-12-02 07:07:59

+0

嗨Abhitalks,非常感謝迅速的援助,但我編輯它,它仍然無法正常工作。 – dexter 2014-12-02 07:47:03

+0

嘿,我想出了一個更直接的方法,它解決了這個問題。謝謝!祝你有個美好的一天,abhitalks。

dexter 2014-12-02 07:52:30

回答

0

看看這段代碼。也許它會幫助你:

<div class="content"> 
    <div class="row"> 
     <div class="col-md-12"><?php include "_/components/php/snippet-carousel.php"; ?></div> 
    </div> 
    <div class="row"> 
     <section class="col-md-3 sidebar"><?php include "_/components/php/aside-social.php"; ?></section> 
     <section class="col-md-9 cont-grid"> 
      <?php include "_/components/php/weekend-intro.php"; ?>  
      <?php include "_/components/php/popular-categories.php"; ?> 
     </section> 
    </div> 
    <div class="row"> 
     <div class="col-md-12"><?php include "_/components/php/footer.php"; ?></div> 
    </div> 
</div> 

你有一個關閉部分沒有開放的一個。我想你把整個東西都包裝在一個容器中?

+0

嘿安迪,感謝您的幫助。 /section closing屬於已編輯的容器部分開口;是的,我把整個東西都包裝在一個容器中。我試過你的方法,但它似乎工作。 我使用了

的外行方法,它可以工作。 現在我正在計算如何獲得響應式設計,將邊欄放在底部而不是頂部?哈哈,編碼太複雜了。 – dexter 2014-12-02 08:15:18

相關問題