Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5927809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:13:19+00:00 2026-05-22T14:13:19+00:00

I have the following ( http://jsfiddle.net/gVZwr/4/ ): <div> <label>From</label> <span>Some Content Goes Here</span> </div>

  • 0

I have the following (http://jsfiddle.net/gVZwr/4/):

<div>
    <label>From</label>
    <span>Some Content Goes Here</span>
</div>

span {
    display: inline-block;
    overflow:hidden;
}

in IE8/9, the label and span don’t align (the label is lower than the span).

Why??? I can fix it by putting overflow:hidden on the label, but I want to know what’s causing it. I tried the old “hasLayout” fixes, such as putting zoom:1 on the label, but nothing seems to fix it except, specifically, overflow.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T14:13:19+00:00Added an answer on May 22, 2026 at 2:13 pm

    Your problem is that inline-block elements with overflow set to anything other than visible have a baseline that’s at the bottom edge of the box (actually, of the bottom margin of the box) instead of having a baseline at the text baseline. See http://www.w3.org/TR/CSS21/visudet.html#propdef-vertical-align the very last paragraph.

    Then that baseline, which basically corresponds to the bottom edge of the span‘s border in your situation is aligned with the baseline of the label, which is the actual baseline of the text in the label. So the text of the label ends up below the text of the span visually.

    WebKit doesn’t follow the spec here and seems to be unwilling to change that because there’s WebKit-specific non-Web content that depends on its current behavior. That’s why you’re not seeing the effect in WebKit.

    Opera 11 does the same thing as IE and Firefox here, per spec.

    Oh, and as far as fixing, you can either change the vertical-align of the label or take out the overflow on the span, assuming you actually need the span to be inline-block.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have following code (live: http://jsfiddle.net/xyZY8/1/ ): var str = '<div>hello</div><ul><li>Some text...</li>' + '<li>second
I have the following example: http://jsfiddle.net/LAMdV/ HTML: <div id=imageSlider> <span class=info id=info1> hello world
I have the following markup: http://jsfiddle.net/dy4TG/3/ <div class=slide-wrap> <div class=slide> <div class=text>Text here</div> <img
I have the following problem: http://jsfiddle.net/DerNa/12/ Which is demonstrated more clearly the jump here:
I have the following code: http://jsfiddle.net/cosoroaba/nCEwv/ HTML: <div id=square> <div class=corner-wrapper> <div id=ctr></div> </div>
I am sure this is simple but... I have the following: http://jsfiddle.net/SUBH3/1/ HTML: <div
let's i have the following code http://jsfiddle.net/QhJWt/ <span contentEditable=true>asdfasdf </span> span { height:20px; width:100px;
I have the following jsfiddle setup: http://jsfiddle.net/eyTBZ/2/ Basically almost everything works, apart from when
I have the following code: http://jsfiddle.net/3fT2M/ Why isn't the two floated div background color
I have the following code: http://jsfiddle.net/dbg5X/ Is it possible to have the second div

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.