CSS Float rendered incorrectly

RESOLVED DUPLICATE of bug 50630

Status

()

RESOLVED DUPLICATE of bug 50630
11 years ago
11 years ago

People

(Reporter: bcoy, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

11 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en) AppleWebKit/523.12.2 (KHTML, like Gecko) Version/3.0.4 Safari/523.12.2
Build Identifier: 

http://www.w3.org/TR/CSS21/visuren.html#propdef-float

In the example at the bottom of section 9.5.1 of this spec, the W3C says that a floated element that was originally inline should remain at the same vertical position if there is space.  It should be side-by-side with a non-floated inline element.  Firefox does this only if the floated element comes first; if the floated element is second (as in this example), it is displaced down one line.

This behavior is limiting because it is impossible to float an element to the right of the last line of text.

Reproducible: Always

Steps to Reproduce:
1. create an html page with inline text
2. float some part of the text to the right (with a span or other element)
Actual Results:  
The floated element is displaced down one line.  In the case of small amounts of text (as in the two-character test), the floated element is placed below the entire inline element.

Expected Results:  
The floated text should move to the right of the page without changing its vertical placement.

IE also exhibits this incorrect behavior, Safari does not.
Component: General → Layout
Product: Firefox → Core
QA Contact: general → layout
Status: UNCONFIRMED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 50630
You need to log in before you can comment on or make changes to this bug.