html - Bootstrap - How to center div that has text inside it? -
i want able center div contains text below in middle of page. though able utilize 'center-block' class in bootstrap doesn't seem work:
live preview: http://codepen.io/anon/pen/tcilg
code below: <div class="row"> <div class="col-md-4 center-block text-center"> want center div text in.i want center div text in.i want center div text in.i want center div text in.i want center div text in.i want center div text in.i want center div text in.i want center div text in.i want center div text in.i want center div text in. </div> </div>
the .col-md-4
class causing float left instead of center. if want maintain width class, can override in css:
.col-md-4.center-block { float: none; }
updated codepen: http://codepen.io/sdsanders/pen/lhrvu
html css twitter-bootstrap
No comments:
Post a Comment