I’m trying to design a website without using tables (why do I torture myself so?).
I’ve encountered a strange anomaly in Mozilla rendering of DIVs and Googling has proved fruitless.
If I have a DIV wrapping around an image with zero padding, it renders as expected in IE 6 and 7 - namely the DIV finishes at the bottom of the image. However, in Mozilla-based browsers, and the new Safari for Windows, there’s a 5px pad at the bottom of the DIV.
Thanks for that, it worked! I didn’t mean to include the version with the height definition as the sample.
FTR that was an error - I even chewed out one of my underlings for omitting the units in a CSS file last week - and I had earlier included “px” in and it didn’t work either.
The only worry I have now is that the loose.dtd might mess up the box model bug in IE6, for which I was a declaring “rigid” (or whatever it is) DTD that was messing up the “margin: auto;” DIV centring in the actual page I’m working on. I shall have to find a computer with IE6 on it and test that with “loose.dtd” declared.