为什么我不能并排拿着三个盒子?

时间:2014-07-17 12:57:17

标签: css twitter-bootstrap joomla

我正在使用twitter bootstrap v2.3.2。我试图将三个div并排放置,但是第三个div进入底层。

 <div class="container">
      <div class="span4">
          <jdoc:include type="modules" name="left" style="none" />
      </div>
      <div class="span4">
           <jdoc:include type="modules" name="middle" style="none" />
      </div>
      <div class="span4">
            <jdoc:include type="modules" name="right" style="none" />
      </div>
</div>

1 个答案:

答案 0 :(得分:3)

你错过了&#39;行&#39;入级div,代码应如此:

<div class="container">
    <div class="row">
        <div class="span4">
            <jdoc:include type="modules" name="left" style="none" />
        </div>
        <div class="span4">
            <jdoc:include type="modules" name="middle" style="none" />
        </div>
        <div class="span4">
            <jdoc:include type="modules" name="right" style="none" />
        </div>
    </div>
</div>