More on CSS spacing

December 1st, 2003

I just found the following on a student website:

For the CSS padding attribute, IE 6 and Opera 5 pad the bottom of text starting from the baseline. Mozilla 1.2.1 starts padding from the lowest point in the text (for instance, the bottom of a y). This affects the display of the title bar on every page, as Mozilla displays more space at the bottom (with respect to the baseline) than at the top. I haven't researched which implementation is correct, but I chose to have the page render correctly with Mozilla. A (self-discovered) hack in use is to set the height of the box to be less than the text size. I am not sure why this works, but with it IE renders well and Opera doesn't look that bad.

I'll give this a try.

Leave a comment