W3C home > Mailing lists > Public > www-style@w3.org > December 2004

Re: Collapsing 0 width margin

From: Ian Hickson <ian@hixie.ch>
Date: Wed, 22 Dec 2004 10:49:55 +0000 (UTC)
To: Laurent Martelli <laurent@aopsys.com>
Cc: www-style@w3.org
Message-ID: <Pine.LNX.4.61.0412221048330.10762@dhalsim.dreamhost.com>

On Tue, 21 Dec 2004, Laurent Martelli wrote:
> 
> I've scratch my head about a rendering problem and it turned out that 
> most browser (I've tested Mozilla and Konqueror, IE is said to do the 
> same) collapse the margin of the last element and the margin of it's 
> parent even if the parent has a zero width margin. I find it weird and 
> counter intuitive. To me a zero width margin if not margin so there's no 
> reason to collapse. I believe the CSS specs version 2.1 and 3 do not 
> says wether a zero width margin is actually a margin that can be 
> collapsed or not. It would be nice to clarify on the subject.

Zero margins do collapse, yes. Margin collapsing in general is rather 
confusing, but it's too late to change things now, pages depend on it.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 22 December 2004 10:49:58 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:35 GMT