Padding difference with windows and linux

Using firefox in Windows and Linux (same version) i get a problem where i cannot specify a shadow underneath text to be consistent, because the margin/padding differences are throwing me out - i have set paddings and margins of all elements to 0 - except the one i wish to change... it's highly annoying!

Test page Workaround is not included
Reported by: Tim.

(ppk disclaimer: I don't have a Linux test box, so I couldn't check this bug report)

(Orphaned), Mozilla | Reported on 25 May 2005.

This site is no longer maintained. I’m sorry, but it’s just too much work for too little return. You can continue to browse old bug reports, though.




Search reports by browser:

Atom RSS

Comments

(Add your own)

1 Posted by Worldseye on 26 May 2005 | Permalink

Have you tried setting the line-height?.. are the fonts identical on both systems?

Dan

2 Posted by Philip Hazelden on 27 May 2005 | Permalink

The first one looks right for me in 1.0 Linux.

3 Posted by Tim Dickinson on 29 May 2005 | Permalink

@Peter Siewert - it seems that page you posted has fixed the problem, not only with firefox, but shadows also work in Internet Explorer now!!! You're a lifesaver mate. Thank you!!!

4 Posted by Chris Chaudruc on 3 June 2005 | Permalink

I have noticed some very important differences in the way the 'padding'attribute is interpreted by Firefox and WinIE.

If you have a with a width of 100, padding of 0 and a 1px black border you will see the same black rectangle in each browser.

If you have a with a width of 100 and a padding-left of 20 with the same border you will see the same 100px wide rectangle in windows - any items contained within it will be shifted right 20 px from the left border.

In Firefox you will see a 120px wide box with contained items shifting right 20px from right margin.

Looks like Firefox shifts the right border 20 px as well!

No good.

5 Posted by TarquinWJ on 9 June 2005 | Permalink

@Chris Chaudruc

This is the age old box model problem. According to the standard, "width" is the width of the content area of the element - not including the border and padding. Old browsers treated width as being the width of the outside of the border.

When rendering in quirks mode some browsers will revert to the old behaviour to be compatible with old websites (in other words, Firefox is right here, IE is deliberately wrong).

I suggest this page for some light reading on the problem, and differences in rendering mode doctype switching between the browsers:
http://hsivonen.iki.fi/doctype/

6 Posted by Mike Lococo on 19 July 2006 | Permalink

Set the line-height to be 1em and firefox/linux behaves the same way as firefox/windows. Without doing so, you can see in the DOM Inspector that the heights are calculated as different values for some reason.