Firefox 3.0 behaves differently than 3.6 – 5.0 when setting left positioning on an element for a page that renders in quirks mode.
- document is in quirks mode
- the element to position does not have a parent with relative or absolute positioning.
- the HTML element has a margin styling greater than 0.
- Do not include margin offset in final calculation.
Why does Firefox 3.0 include the margin on the HTML element in quirks mode when calculating the distance of an element from the left edge of the screen? I would guess to be more compatible with the quirks mode behavior found in the version of IE during that era.
<style type="text/css" media="screen">
margin-left: 10px; /* who does this?? */
border: 1px solid #000;
Screen captures of above code in Firefox 3.0 and all other modern browsers (capture was taken in Firefox 5.0, but appears the same in Chrome 12 and Safari 5).
Firefox 3.0 (3.0.13)
All other modern browsers