开发者

List item inside #footer text not going to center

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&开发者_JS百科lt;/li> 
    <li>item2</li>
  </ul>
</div>


ul {text-align:center;}
li {display:inline;padding:10px;}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜