CSS/Bootstrap 容器

标签 css twitter-bootstrap

我想要两个容器,因为当我改变大小时,它也会改变菜单的大小。这是我的索引 http://paste.laravel.com/GN8 ,我想要这部分:

     @if ($news->count())
            @foreach($news as $news)
    <div class="container">
<div class="doc-content-box">
        <legend>{{ $news->title }} <div id="spaceholder"></div>

        <p>
          <h6><i class="icon-calendar"></i> {{ $news->created_at }} &nbsp;&nbsp;&nbsp;&nbsp;<a href="/profile/{{ $news->author }}">{{ $news->author }}</a>
        </p>
      </h6>
      </legend>
        <div style="margin-top:7px">

<p>{{ $news->content }}</p>
    </div>

</div> <!-- /container -->
<div id="spaceholder">&nbsp;</div>
        @endforeach
        @else
    {{ 'There are no news.' }}
@endif

宽度为 749px,当我复制之前添加的 .container 时,它只是将它拉到左边。 我希望它类似于 container-two

我还有覆盖容器的自定义 CSS: http://paste.laravel.com/JEt

最佳答案

添加容器这个样式:

margin: 0 auto;

关于CSS/Bootstrap 容器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18063886/

相关文章:

HTML:将文本和图像布局在一起

html - Angular2 + Kendo MultiSelect 每行列出每个元素

jquery - 并排创建两个 div 的 Bootstrap 布局

javascript - Bootstrap 下拉菜单+选项卡无法正常工作

javascript - 重置 Bootstrap 按钮状态

css - 推特 Bootstrap : less compilation taking a long time

html - 如何更改 Google Chrome 中 <option> 元素的背景颜色?

jquery - 如何让div无法悬停?

html - CSS float div从左到右彼此下方

javascript - 图像切换时未出现幻灯片动画