floated paragraph appears with excessively large margins causing it to appear BELOW blocks occurring after it

VERIFIED INVALID

Status

()

Core
CSS Parsing and Computation
VERIFIED INVALID
16 years ago
16 years ago

People

(Reporter: Ben Martin, Assigned: dbaron)

Tracking

Trunk
x86
Windows 98
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

16 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.2b) Gecko/20021016
Build Identifier: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.2b) Gecko/20021016

The first paragraph is of a class that has float: left specified. However, it
appears BELOW the second paragraph.

This appears to be an error with the margins for the floated block. If I
explicitly add margin: 0; to the style for the first paragraph, the bahvior is
as expected. The CSS2 specs indicate margin widths should be 0 initially.

Reproducible: Always

Steps to Reproduce:
1. Open the attachment.
2. Notice the white space around the first paragraph.

Actual Results:  
Paragraph 1 appears with too much whitespace above and below.

Expected Results:  
Paragraph 1 should be near the top of the page (even with the top of paragraph
2, perhaps?)
(Reporter)

Comment 1

16 years ago
Created attachment 104292 [details]
xhtml file demonstrating expected behavior (with margin: 0)
(Reporter)

Comment 2

16 years ago
Created attachment 104294 [details]
xhtml file demonstrates incorrect behavior
(Reporter)

Updated

16 years ago
Attachment #104292 - Attachment description: xhtml file demonstrating incorrect behavior → xhtml file demonstrating expected behavior (with margin: 0)
The default user-agent stylesheet for HTML has a top and bottom margin of 1em
for P elements.  This is the expected rendering of P in HTML based on tradition.
 Any user agent that changes this margin when only the 'float' property is
specified is buggy.

(To see that the margin exists, consider a testcase such as
"<div style="border: medium solid;"><p>Paragraph</p></div>".)
Status: UNCONFIRMED → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → INVALID
v
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.