Center the content of div with bootstrap

css, twitter-bootstrap

Solution

Fix the width of your `.menu-footer`, and add

margin: 0 auto;

to center it on its parent `div`.

Problem

I have this footer: ``` <div id="footer" class="navbar-bottom"> <div class="navbar-inner"> <div class="row"> <div class="span12" style="text-align: center;"> <ul class="menu-footer"> <li><a href="#"><img src="images/fportfolio.png"><p class="merg-top">Portfolio</p></a></li> <li><a href="#"><img class="center" src="images/fabout.png"><p class="merg-top">About</p></a></li> <li><img width="160px" src="images/logo.png"></li> <li><a href="#"><img src="images/fclients.png"><p class="merg-top">Clients</p></a></li> <li><a href="#"><img src="images/fcontact.png"><p class="merg-top">Contact</p></a></li> </ul> </div> </div> </div> </div> ``` Each text and image are centered perfectly inside the `li` element, now I like the `ul` element reside in center of the div, but its now aligned to left.

Original source