Closed Bug 856484 Opened 12 years ago Closed 12 years ago

When two inline-block elements are put side by side on the same line, applying overflow:hidden to one causes it to move up a number of pixels

Categories

(Core :: Layout, defect)

19 Branch
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: fuzzyfuzzykitty+mozilla, Unassigned)

Details

Attachments

(1 file)

Attached file derp.html
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0 Build ID: 20130307023931 Steps to reproduce: Open the attached file, observe the CSS / DOM. Actual results: The second inline element is a number of pixels higher than the adjacent one. Expected results: The two items should be aligned to the same baseline. Note that the "correct" behavior described is the behavior in webkit-based browsers.
Attachment #731728 - Attachment mime type: text/plain → text/html
Seems this is old behavior (4.0.1 - the same)
Component: Untriaged → Layout
OS: Windows 7 → All
Product: Firefox → Core
Hardware: x86_64 → All
The behavior you observe is the one the spec requires, if everything is baseline-aligned. In particular, see http://www.w3.org/TR/CSS21/visudet.html#line-height last paragraph, which says: The baseline of an 'inline-block' is the baseline of its last line box in the normal flow, unless it has either no in-flow line boxes or if its 'overflow' property has a computed value other than 'visible', in which case the baseline is the bottom margin edge. The fact that WebKit doesn't do that is a known WebKit bug that they're refusing to fix because they have various Apple-proprietary content depending on the bug. See https://bugs.webkit.org/show_bug.cgi?id=36084
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: