html - Bootstrap 中心内容很好

标签 html css twitter-bootstrap center

我正在尝试使用 Twitter Bootstrap 将一些内容集中在 Well 类中。

我尝试过使用 row 和各种其他 CSS 技巧。

这是我的 HTML:

<div class="container well well-main">
   <div id="marketing-mobile" class="title-marketing"><h3 class="text-center">Mobile</h3></div>
    <div class="widget-marketing span5">
        <div class="media">
          <a class="pull-left" href="#">
            <img class="media-object media-icons" img src="img/book.png">
          </a>
          <div class="media-body">
            <h3 class="media-heading">Lorem Ipsum</h3>
            <p>Donec id elit non mi porta gravida at eget metus. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
          </div>
        </div>
    </div>

我已经截取了问题的屏幕截图:enter image description here

最佳答案

此问题已解决,但如果有人有兴趣查看示例,则在本例中 offset3 可以使 span5 居中<​​/p>

<div class="container well well-main">
   <div id="marketing-mobile" class="title-marketing"><h3 class="text-center">Mobile</h3></div>
    <div class="widget-marketing span5 offset3">
        <div class="media">
          <a class="pull-left" href="#">
            <img class="media-object media-icons" src="//placehold.it/75x75">
          </a>
          <div class="media-body">
            <h3 class="media-heading">Lorem Ipsum</h3>
            <p>Donec id elit non mi porta gravida at eget metus. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
          </div>
        </div>
</div></div>

http://bootply.com/65949

关于html - Bootstrap 中心内容很好,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15935719/

相关文章:

javascript - 如何在 jQuery/js 中使用 if 语句更改变量值

javascript - 在 javascript 中将新成员显示到 html 显示列表

html - DIV 未显示在正确位置的问题 - 已解决

html - 如何在 <li> 列表样式中添加加号 (+)?

html - 网络字体渲染

css - Twitter Bootstrap 流体行水平对齐

html - 对齐输入并在同一行中选择(bootstrap mobile)

html - Bootstrap 中的默认填充类可用

javascript - 使用 javascript/jquery 从 Web 表单动态添加(和删除)一组文本元素

css - 如何删除具有特定类名的最后一个 div 的边框? [ :last-child] is not working