Closed Bug 269327 Opened 20 years ago Closed 20 years ago

Absolutely positioned <p> is offset by 16px

Categories

(Core :: Layout: Positioned, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: bugzilla, Unassigned)

Details

Attachments

(1 file)

When I absolutely position a <p> at top: 84px, it is positioned at 100px in the
root element. I can't explain this.

Reduced testcase coming.
Attached file Reduced testcase
Actual results in Mozilla 1.8a5 build 2004110905 and Firefox 1.0 final release
rv: 1.7.5 build 20041107: the <p> is positioned at 100px from the top edge of
the html element.

Expected results: the <p> should be positioned at 84px from the top edge of the
html element.

Note that both MSIE 6 SP2 SV1 and Opera 7.60 beta 2 position the <p> at 84px
from the top edge of the html element.
P has a UA-default vertical margin of 1em.
Yes, you are right (<grunt>I never suspected/thought about a vertical
margin</grunt>). OTOH,
"'margin-top', 'margin-bottom' 
Initial:  	0"
http://www.w3.org/TR/CSS21/box.html#margin-properties

*** This bug has been marked as a duplicate of 33784 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
Appendix D. Default style sheet for HTML 4.0 of CSS2.1 
http://www.w3.org/TR/CSS21/sample.html
gives
p {margin: 1.12em 0;}
and no margin for div. 

Also, margin is 0 (for <p>) when the document triggers quirks mode.

Resolving as INVALID
Resolution: DUPLICATE → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: