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 6040397
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T06:30:30+00:00 2026-05-23T06:30:30+00:00

html: <div id=outer> <div id=inner> </div> </div> css: #outer { position: absolute; left: 100px;

  • 0

html:

<div id="outer">
    <div id="inner">
    </div>
</div>

css:

#outer {
    position: absolute;
    left: 100px;
    top: 0;
    width: 100px;
    height: 100px;
    direction: rtl;
    background-color: blue;
}
#inner {
    display: inline-block;
    position: absolute;
    width: 50px;
    height: 50px;
    background-color: yellow;
}

In Chrome, the yellow box is outside of the blue box.

In other browers(firefox, IE), the yellow box is inside the blue box.

Is it a bug of webkit, and why?

a test case on jsfiddle:
http://jsfiddle.net/QF9tT/

  • 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-23T06:30:30+00:00Added an answer on May 23, 2026 at 6:30 am

    You should simply remove display: inline-block from #inner.

    See: http://jsfiddle.net/QF9tT/1/

    position: absolute will force a computed display value of block, so display: inline-block should not be doing anything whatsoever:

    http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo

    Otherwise, if ‘position’ has the value
    ‘absolute’ or ‘fixed’, the box is
    absolutely positioned, .., and display
    is set according to the table below.

    [inline-block = block]

    But, it appears in this case that this behaviour is buggy in Chrome.

    You should consider filing a report here: http://code.google.com/p/chromium/issues/list

    Then again, the issue is easy to fix: don’t specify a nonsensical display value on an absolutely positioned element.

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

Sidebar

Related Questions

I have the following html code: <div class=outer ui-draggable style=position: relative;> <div class=inner>Foo bar</div>
I have the following html structure <div style=overflow-x:auto;overflow-y:hidden;position:relative> <div style=position:absolute; top:0;bottom:0;padding-top:30px> </div> </div> When
I've got this html (simplified) <div class=outer style=float:left> <div class=inner style=float:left> <div class=contained style=clear:both>...</div>
Here are css, html and js to reproduce: html: <div id=outer> <div>123</div> <div id=inner>345</div>
//html structure <div id='outer'> <div id='inner'> </div> </div> I am adding some data to
$(this).parent().parent() .children(this.attr(tagName).toLowerCase()) .css(background-color, yellow); xpath: /html/body/div/table/tr/td/b/a $(this).tagName is Anchor <a> the problem with this
Here is the HTML: <div id=outer> <div id=inner></div> Test </div> And here is the
I have follwoing HTML <div style=border: 1px solid;> <div style=background-color: blue; width: 1200px;> <h3>
I have the following HTML: <div class=outer> <div class=inner></div> <div class=inner></div> </div> Why does
There is an inner div of fixed width and variable height contained by an

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.