tags:

views:

23

answers:

1

I want to keep list item in the center of #footer div always. Footer is flexible.

I'm using current code but it's not making list item in center.

#footer {overflow:hidden;text-align:center}
#footer ul {margin:0 auto}
#footer li {float:left;padding:10px;text-align:center}

HTML

<div id="footer">
  <ul>
    <li>item1</li> 
    <li>item2</li>
  </ul>
</div>
+3  A: 
ul {text-align:center;}
li {display:inline;padding:10px;}
lashtal
Thanks for reply. but it needs to specify height on `footer` or on `ul`
metal-gear-solid