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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:15:32+00:00 2026-06-16T01:15:32+00:00

Chrome Version: 23.0.1271.95 m Operating System: Windows 7 64 bit Please check the test

  • 0

Chrome Version: 23.0.1271.95 m
Operating System: Windows 7 64 bit

Please check the test page in http://jsfiddle.net/CTdQd/2/ or source code blow.

In the page there is a parent div with style “display: inline-block; position: relative;” which has 3 children with different width and height. Only one of the children has a “relative” position , other two have “absolute” position. When switch the “relative” position among the 3 children, the parent div’s height updates correctly but not width, its width doesn’t change. It’s OK in Firefox and IE. Is this a chrome bug?

<!DOCTYPE html>
<html>
<head>
  <meta content="text/html; charset=UTF-8" http-equiv="content-type">
  <title>test</title>
  <script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
  <style>
    #wrap {
      border: 1px solid #F00;
      display:inline-block;
      position:relative;
    }
    .out {
      position:absolute;
      left: 0;
      top: 600px;
    }
    .out.in {
      position:relative;
      left: 0;
      top: 0;
    }
  </style>
</head>
<body>
  <div style="width:600px;height:400px;border:1px solid #DFDFDF;text-align:center;overflow:hidden;">
    <div id="wrap">
      <div id="item1" class="out in" style="width:200px;height:200px;background-color:#0F0;">200*200</div>
      <div id="item2" class="out" style="width:300px;height:100px;background-color:#00F;color:#FFF;">300*100</div>
      <div id="item3" class="out" style="width:400px;height:300px;background-color:#DDD;">400*300</div>
    </div>
  </div>
  <p id="log"></p>
  <div style="margin-top:10px;">
    <input type="submit" id="test1" value="show1">
    <input type="submit" id="test2" value="show2">
    <input type="submit" id="test3" value="show3">
  </div>
  <script>
    $(function() {
        $('input').click(function() {
            var parent = $('#wrap');
            $('.in').removeClass('in');
            $('.out').eq($(this).index()).addClass('in');
            $('#log').text('the parent div\'s width: ' + parent.width() + 'px, height: ' + parent.height() + 'px');
        });
    });
  </script>
</body>
</html>
  • 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-06-16T01:15:34+00:00Added an answer on June 16, 2026 at 1:15 am

    I believe this is a bug in WebKit. I filed WebKit bug 104872 for this.

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

Sidebar

Related Questions

If you visit http://www.framingham.edu/ in the latest stable version of Chrome, you'll notice that
Vitals: Chrome Version 23.0.1271.64 Mac OS X 10.8.2 The Situation: I have a web
I am using Windows XP SP2 and Chrome (version 9.0.597.19) but every time I
See this page in Chrome: http://jsbin.com/onariz/ Now it looks normal: Ok. Now if you
Which version of JavaScript does Google Chrome support in relation to Mozilla Firefox? In
Our app supports different browser version from IE to Firefox to Chrome. Now, some
Using Chrome Version 22.0.1229.79 m We provide users with a way of printing the
I'm using Chrome version 5.0.375.55 and Firefox version 3.5.9 but I can't get the
I'm using colorbox to display images for a website. In Chrome version 11.0.696.65 only
I've written a more detailed post about this on my blog at: http://idisposable.co.uk/2010/07/chrome-are-you-sanitising-my-inputs-without-my-permission/ but

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.