Open Bug 500380 Opened 16 years ago Updated 3 years ago

float right elements are floating too high.

Categories

(Core :: Layout: Floats, defect)

x86
Windows XP
defect

Tracking

()

People

(Reporter: k4mik4dze, Unassigned)

Details

(Keywords: regression, testcase)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.1) Gecko/20090624 Firefox/3.5 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.1) Gecko/20090624 Firefox/3.5 If you add image with style float right inside div then its margint-top will be calculated differently than in FF 3.0.11. calculation difference is ~20px. It seems like floating element is positioned to align top of wrapping element rather than bottom like it used to be. Reproducible: Always Steps to Reproduce: Execute this code (note, missing image will be displayed instead of real): <html> <head> <style type="text/css"> .Header { border: 1px solid #ccc; height:20px; width:300px; font-weight:bold; text-align:center; } .Header img { float: right; margin-right: 5px; margin-top: -18px; border: 1px solid black; width: 13px; height: 19px; } </style> </head> <body> <div>&nbsp;</div> <div class="Header">Header <img src="header_ico.gif" alt=""/></div> </body> </html> Actual Results: Image is positioned outside "box" Expected Results: FF 3.0.11 and earlier are displaying image inside "box". Noticed that image is positioned inside "box" also these browsers: Opera , Ie7 , Ie8 Outside: Safari4, Chrome 2
Version: unspecified → 3.5 Branch
Status: UNCONFIRMED → NEW
Component: General → Layout: Floats
Ever confirmed: true
Keywords: regression, testcase
Product: Firefox → Core
QA Contact: general → layout.floats
Version: 3.5 Branch → Trunk
Could be changeset 5c30c5953d22 but I see no bug number.
The image is placed outside the "box" in Nightly 50 but also on Chrome 49, Safari 9.1.1, Opera 36, IE 8, Edge. Is this really a bug or it is expected behavior? I'm asking because all the major browsers do the same.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.