Closed Bug 570060 Opened 14 years ago Closed 14 years ago

"display: inline-block; overflow: hidden;" moves the element upward

Categories

(Firefox :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 491549

People

(Reporter: musiphil, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 ( .NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 ( .NET CLR 3.5.30729)

An inline text that has the style "display: inline-block; overflow: hidden;" is displayed higher than the surrounding text (under the default vertical-align: baseline).

Omitting either attribute specification causes the text to appear on the same baseline; the combination of the two causes the offset.

Reproducible: Always

Steps to Reproduce:
Enter the following in an HTML file and open it in Firefox:

HHH <span style="overflow: hidden; display: inline-block; vertical-align: baseline;">HHH</span> HHH
Actual Results:  
The middle "HHH" appears higher than the surrounding text.

Expected Results:  
All the "HHH" should appear on the same baseline.
A minor thing: in "Steps to Reproduce" above, I meant the following:

HHH <span style="display: inline-block; overflow: hidden;">HHH</span> HHH

(Adding "vertical-align: baseline;" doesn't change the behaviour because it is the default; it just makes the example a bit longer.)
That is the correct / expected behaviour, see

https://bugzilla.mozilla.org/show_bug.cgi?id=491549#c9
http://www.w3.org/TR/CSS21/visudet.html#propdef-vertical-align
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.