突然懵了!麻烦大神帮忙看下我这段代码整体怎么居中?
这个列表怎么让它显示在浏览器的中间?text-align:center不管用啊?
<html> <head> <style type="text/css"> ul {padding:0; margin:0; list-style-type:none; overflow:hidden;} li {float:left;} a:link, a:visited { display:block; width:120px; color:white; background:#98bf21; text-align:center; padding:4px; text-decoration:none; text-transform:uppercase; } a:hover, a:active {background:red;} </style> </head> <body> <ul> <li><a href="#">首页</a></li> <li><a href="#">新闻</a></li> <li><a href="#">热点</a></li> <li><a href="#">用户</a></li> </ul> </body> </html>