Bootstrap Grid,无法将它们分隔成所需的列空间

时间:2014-12-02 07:03:33

标签: html twitter-bootstrap grid rows

我是编程新手,难以调整引导网格以适应我的框架;我试图在左边做一个3列的侧栏,然后在右边有一个9列的主侧栏 - 但是在我输入我的代码之后它们每个都显示为12列。

      <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 -->

1 个答案:

答案 0 :(得分: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>

你有一个关闭部分没有开放部分。我想你把整个东西都装进容器里了?