Hello, I was wondering if anyone has run into this before? I did a lot of searching but couldn't really find anything.
I am doing a nav menu based on a list, however, the list is supposed to overlay a background image so it needs to be precise. But I noticed that a basic list works quite different between IE and Firefox (haven't even looked at Safari or Opera yet).
Below is some sample code. If you open in firefox, the li is not the same height as the ul, there seems to be top padding even though the padding is set to 0. In ie, both the li and ul borders line up perfectly.
If anyone has any info to share about making these lists line up the same accross the major browsers, that'd be great!
-----------------------------------------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style>
body
{
background-color: black;
}
ul
{
border: 1px solid white;
padding: 0px;
margin: 0px;
list-style: none;
}
li
{
display: inline;
border: 1px solid pink;
text-align: center;
font-size: 11px;
font-weight: bold;
padding: 0px 25px;
margin: 0px;
color: white;
}
</style>
</head>
<body>
<ul>
<li>test 1</li>
<li>test 2</li>
<li>test 3</li>
</ul>
</body>
</html>







Bookmarks