This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 6586 - Zero margin quirk not quite right
Summary: Zero margin quirk not quite right
Alias: None
Product: HTML WG
Classification: Unclassified
Component: pre-LC1 HTML5 spec (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
Depends on:
Reported: 2009-02-16 10:46 UTC by Simon Pieters
Modified: 2010-10-04 13:57 UTC (History)
3 users (show)

See Also:


Description Simon Pieters 2009-02-16 10:46:04 UTC
The spec says in the rendering section

"When a Document is in quirks mode, margins on HTML elements that collapse with the top or bottom of the initial containing block, or the top of bottom of td or th elements, are expected to be collapsed to zero."

I see the zero-margin effect also when I set a border on body or th/td. Margins don't collapse when there's a border, so the spec is not in effect in that case, AFAICT.
Comment 1 Simon Pieters 2009-03-31 06:23:09 UTC
# [08:20] <zcorpan> Hixie: you can have a border on body, too, and the margins will collapse  
# [08:21] <zcorpan> Hixie: actually... if you specify p { margin:1em 0 } in the style sheet, then margins *don't* collapse  
# [08:21] <Hixie> -> mail or bugs please :-)  
# [08:21] <Hixie> and it actually depends on the UA, last i checked  
# [08:21] <Hixie> webkit uses a special unit  
# [08:22] <Hixie> (iirc that was my idea)  
# [08:22] <Hixie> not sure about the other UAs  
Comment 2 Ian 'Hixie' Hickson 2009-05-29 08:36:26 UTC
I need to change the mention of the ICB to <body>.
Comment 3 Ian 'Hixie' Hickson 2009-05-30 03:50:01 UTC