Consider the following HTML markup. In most browsers I tested, the second list is displayed differently (each list item is indented).
The only difference between the two lists relates to the CSS font style property, which I would not expect to change the list layout. Is there an explanation for this behavior?
<!DOCTYPE html>
<html>
<head>
<style>
body {font-family: sans-serif}
span {float: left}
ul.bad span {font-style: italic}
</style>
</head>
<body>
<ul>
<li><span>foo</span></li>
<li><span>foo</span></li>
<li><span>foo</span></li>
<li><span>foo</span></li>
</ul>
<ul class="bad">
<li><span>foo</span></li>
<li><span>foo</span></li>
<li><span>foo</span></li>
<li><span>foo</span></li>
</ul>
</body>
</html>
source
share