why css tabs look different in ie and firefox
i have created some tabs using css but they look horrible in ie 7. Why? Here is the html
<ul>
<li><a href='view.php'>View</a><li>
<li><a href='logout.php'>Logout<开发者_JS百科;/a><li>
<li><a href='www.google.com'>Search</a><li>
</ul>
and here is the css
ul{list-style:none;height:20px;}
li{background-color:#ff0;float:left;margin:5px;width:60px;text-align:center;display:block;}
li:hover{background-color:#009;}
a{text-decoration:none;}
Here is how it looks in ff
Here is how it looks in ie
You're not terminating your list items correctly. Try replacing each <li>
at the end of the lines with </li>
and you should be good.
Have you tried a reset CSS like :
http://meyerweb.com/eric/tools/css/reset/
It could be appreciable...
Edit
@Kaivosukeltaja is right :
<li>...</li>
Will fix your problem. But you can let the CSS reset on your page ;)
精彩评论