首页 > 怎么让bootstrap删格系统里的标题居中呢?

怎么让bootstrap删格系统里的标题居中呢?

怎么让bootstrap删格系统里的标题居中呢?标题是动态加的,我以四个字居中如果字数多一些就会跑偏,使用margin:0 auto;没有用。

<div class="row">

    <div class="col-xs-12"> 
        <!-- PAGE CONTENT BEGINS -->
            <div  id="title" >
            <h3 style="margin:0 auto;">娱乐场所</h3>
            </div>
            <div class="col-sm-8" id="pic">
            <div><img src="./朝阳区管理员 - 管理后台_files/fabushijian.png">&nbsp;2016-03-16 16:36:37</div>
            <div><img src="./朝阳区管理员 - 管理后台_files/zuozhe.png">&nbsp;朝阳区管理员</div>
            <div><img src="./朝阳区管理员 - 管理后台_files/liulancishu.png">&nbsp;0</div>
            <div><img src="./朝阳区管理员 - 管理后台_files/fenlei.png">&nbsp;法规</div>
            </div>
            </div>

<p class="text-left">Left aligned text.</p>
<p class="text-center">Center aligned text.</p>
<p class="text-right">Right aligned text.</p>
<p class="text-justify">Justified text.</p>
<p class="text-nowrap">No wrap text.</p>

bootstrap官方文档 http://getbootstrap.com/css/#type-alignment


text-align: center !important;

<h3 class="text-center">娱乐场所</h3>

试下这个


text-align="center"
或者用boostrap的class="text-center"
应该可以

【热门文章】
【热门文章】