网格列跨越Bootstrap 3选项卡窗格内的全宽

时间:2014-09-27 15:58:49

标签: css twitter-bootstrap tabs twitter-bootstrap-3 grid-layout

我似乎无法让这个工作 - 我的列全宽。 Here's a JSfiddle for direct use

<div class="container-fluid">
<div class="panel panel-default">
  <div class="panel-body">

    <!-- Nav tabs -->
    <ul class="nav nav-tabs" role="tablist">
        <li>
          <a href="#p1" class="btn btn-primary" role="tab" data-toggle="tab">
              <span class="glyphicon glyphicon-cloud"></span>
          </a>
        </li>
        <li>
          <a href="#p2" class="btn btn-primary" role="tab" data-toggle="tab">
              <span class="glyphicon glyphicon-cloud"></span>
          </a>
        </li>        
    </ul>

    <!-- Tab panes -->
    <div class="tab-content">

      <!--Open Panel Controls-->
      <div class="tab-pane active" id="p1">
          <!-- HERE IS THE PROBLEM AREA - I want a grid here, but no luck :-/ -->
          <div class="row">
              <div class="column-md-4" style="background: green;">
                  This is my first column
              </div> <!-- /col emulator-->
              <div class="column-md-1">
              These are buttons
              </div>
          </div> <!--/row-->
      </div>

      <div class="tab-pane" id="p2">
          <div class="row">
              <div class="column-md-4" style="background: red;">
                  This is my first column, page 2
              </div> <!-- /col emulator-->
              <div class="column-md-1">
              These are buttons, page 2
              </div>
          </div> <!--/row-->
      </div>

      </div> <!-- /tab-content -->

    </div> <!-- /panel-body -->
    </div> <!-- /panel>
</div> <!-- /container-fluid -->


    <script src="/scripts/bootstrap.min.js"></script>

1 个答案:

答案 0 :(得分:5)

哎呀,简单的错误。这是修复

          <!-- It's col, not column -->
          <div class="col-md-4" style="background: green;">
              This is my first column
          </div> <!-- /col emulator-->
          <div class="col-md-1">