Hallo Ashura,
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>ul and li: padding and margin</title>
<style type="text/css">
ul, li {
margin:0;
padding:0;
}
ul {
color:#fff;
}
li {
padding-left:20px;
background:#036;
border: 1px solid red;
font-size:0.7em;
}
li {
background-repeat: no-repeat;
background-image: url(http://devhu.destour.info/images/RightArrow.gif);
background-position: left center;
}
</style>
</head>
<body>
<ul>
<li><span>Foo</span></li>
<li>Bar</li>
<li>Baz</li>
<li>Qux</li>
</ul>
</body>
</html>
Man sieht, dass hier der Pfeil nicht geanu in der Mitte ist
Beim nächsten Beispiel ist er dann in der Mitte:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>ul and li: padding and margin</title>
<style type="text/css">
ul, li {
margin:0;
padding:0;
}
ul {
color:#fff;
}
li {
padding-left:20px;
background:#036;
border: 1px solid red;
_display:inline;
font-size:0.7em;
}
li span {display:block;}
li {
background-repeat: no-repeat;
background-image: url(http://devhu.destour.info/images/RightArrow.gif);
background-position: left center;
}
</style>
</head>
<body>
<ul>
<li><span>Foo</span></li>
</ul>
</body>
</html>
Firefox zeigt alles richtig an schon beim 1. mal
Gruß
Andi