开发者

List item inside #footer text not going to center

开发者 https://www.devze.com 2023-01-15 02:24 出处:网络
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.

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

精彩评论

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