我想在引导程序中嵌套的div居中,这也是包装的内部。嵌套的div居中引导问题
基本上它坚持我的包装的左侧,而不是相对居中本身。
HTML:
<div class="wrapper center-block">
<P>
The panels below need to be centered so they dont stay left.
They aren't supposed to line up with this paragraph, but be offset so that it looks "fluid"<br />
i.e. stop here<br />
v
</P>
<div class="row">
<div class="col-lg-8 center-block">
<!-- WHY WONT THIS NESTED DIV CENTER!?-->
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><strong>Test panel </strong></h3>
</div>
<div class="panel-body">
test
</div>
</div>
</div>
</div>
<div class="panel-footer col-sm-10 center-block">
<p><small>test footer</small>
</p>
</div>
</div>
<!-- /container -->
CSS:
.wrapper{
max-width:1200px;
float: none;
margin: 0 auto;
}
我在想使另一包装但这只是似乎过高。有另一种方法吗?