W3C home > Mailing lists > Public > www-html@w3.org > April 2000

RE: Ignoring empty paragraphs

From: <JOrendorff@ixl.com>
Date: Mon, 10 Apr 2000 18:14:48 -0400
Message-ID: <CD8E2CDBC6D0D111ACB900805FBBD97E0263029B@host131sub18.offices.ixl.com>
To: www-html@w3.org
I wrote:
>> <div>foo</div><p></p><div>bar</div>
>>
>> The <p> is not "ignored" here;
>> it introduces a gap of about 1em, depending on your browser's
>> setting for margins on <p>.

Jan Roland Eriksson replied:
> It does _not_ in Mozilla M14 "strict" mode.
> (yes, I did try exactly your line up here before posting :)

If it doesn't, then perhaps it is pruning the empty <p> elements
altogether, before the rendering engine sees them.  In any case,
CSS2 requires the gap if the <p> elements remain in the tree:

CSS2 Recommendation, Section 8.3.1, "Collapsing Margins":
http://www.w3.org/TR/REC-CSS2/box.html#collapsing-margins
] Two or more adjoining vertical margins of block boxes in the
] normal flow collapse. The resulting margin width is the maximum
] of the adjoining margin widths.

-- 
Jason Orendorff
Received on Monday, 10 April 2000 18:23:53 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:43 GMT