Closed
Bug 241581
Opened 20 years ago
Closed 20 years ago
Inserting a P inside a DIV causes a 10-15px margin to appear above the DIV
Categories
(Core :: Layout: Block and Inline, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: juliant, Unassigned)
Details
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040113 I create a simple DIV as the firstChild of BODY, thus <body style="margin: 0pt; padding: 0pt;"> <div style="margin: 0pt; padding: 0pt; background-color: green;"> <p>Test</p> </div> It renders with a 10-15px white margin at the top, except when position:absolute is set. Reproducible: Always Steps to Reproduce: See details, just cut and paste the code into a blank page. <body style="margin: 0pt; padding: 0pt;"> <div style="margin: 0pt; padding: 0pt; background-color: green;"> <p>Test</p> </div> </body> Actual Results: It renders with a 10-15px white margin at the top, except when position:absolute is set. Expected Results: Rendered the div at line 0.
Comment 1•20 years ago
|
||
The <p> has a 1em top and bottom margin. The top margin collapses with the margin of the <div>, correctly. See http://www.w3.org/TR/CSS21/box.html#collapsing-margins
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•