如何将span7
内的div居中,以便span7
和span5
都显示在同一行中。我正在使用bootstrap 2.3.2
这是我的代码jsfiddle
<div class="row-fluid">
<!-- 1st Column -->
<div class="span7">
<div id="imagediv" style="position: relative;">
<img src="" style="z-index: 0;" >
</div>
</div>
<!-- END 1st Column -->
<!-- 2nd Column -->
<div class="span5">
<div>
<p class="well" style="min-height: 440px; word-wrap: break-word;"> Profile Info </p>
</div>
</div>
<!-- End 2nd Column -->
</div>
如何将imagediv
置于span7
答案 0 :(得分:1)
<div id="imagediv" class="text-center" style="position: relative;">
<img src="" style="z-index: 0;" >
</div>
添加课程text-center
答案 1 :(得分:0)
将CSS属性添加为margin:0 auto;到#imagediv
答案 2 :(得分:0)
将text-center
类添加到div
<div class="span7 text-center">
<div id="imagediv" style="position: relative;">
<img src="http://s25.postimg.org/scg5jg3rf/profile.jpg" style="z-index: 0;" />
</div>
</div>
工作jsfiddle http://jsfiddle.net/aCD89/3/
屏幕截图输出: