Twitter Bootstrap Fluid row horizontal alignment
css, html, twitter-bootstrap
Solution
To follow bootstrap rules, try to center it with the `offset` class
<div class="row-fluid">
<div class="span4 offset4">
<img src="yourimage" />
</div>
</div>
see documentation
Problem
I've a fluid row in which i have a item (nontext) and I want to align it horizontal centered text ``` <div class="container-fluid"> <div class="row-fluid"> <div class="span12" style="text-align: center"> <img src="@Url.Content("~/Images/Domain/IMG_1710.jpg")" /> </div> </div> </div> ``` this works pretty fine but as soon as I add a max-width and max-height the alignment doesn't work anymore. ``` <div class="container-fluid"> <div class="row-fluid"> <div class="span12" style="text-align: center;max-height: 300px; max-width: 400px" > <img src="@Url.Content("~/Images/Domain/IMG_1710.jpg")" /> </div> </div> ``` What am I doing wrong ? How can I set max width and hight and have a centered alignment?