Forum Moderators: not2easy
Another fix is to dump the list and just use some <br />.
Hacking through it is simple enough, but I'm much more interested in where this margin is coming from, and why.?
ul {
margin: 0; padding: 0;
}
li {
margin: 0; padding: 0;
}
img {
margin: 0;
}
<ul>
<li>
<img src="xx" />
</li>
<li>
<img src="xx" />
</li>
</ul>
I'm much more interested in where this margin is coming from, and why.
presuming it's not a "whitespace in lists" bug, Firefox wouldn't exhibit that anyway..
But I think here that setting the images to "display: block" and/or setting their vertical-align and line-height property should help.
Images are inline elements by default so they align themselves as per inline text. The (4-5px) gap at the bottom is the space that is left by default for descenders within text. e.g. g, p, j, y. In vertical-align terms this is the difference between baseline and bottom. As you increase the font-size, the gap will increase too.. although imperceptibly in most cases..
Here is an explanation of mysterious gaps [devedge.netscape.com] although it's written about tables it applies to all elements really, and the illustrations show the baseline/bottom thing more clearly
Suzy
A test of {vertical-align: baseline;} put things back just the way they were, with that 4-5px gap at the bottom.
You're dead-on again.