2

I'd like to divide the browser window into two. The right side should contain a fixed-size column. The left side should contain a dynamic-sized column that fills the rest of the space.

My implementation has the following bug:

  1. Run the testcase (below)
  2. Shrink the window horizontally until the red bar has a width of zero.
  3. Notice that if you shrink the window further, the red bar suddenly increases in size.
  4. How do I get the red bar to remain hidden and the blue bar to begin shrinking?

UPDATE: It looks like the red bar is being pushed above the blue bar (like two <div>s rendering on different lines). Is there a way to force both blocks to render on the same line?

jsFiddle demo (edit)

<!DOCTYPE html>
<html>
<head>
  <style type='text/css'>
    html
    {
      height: 100%;

      /* Workaround until http://stackoverflow.com/a/2629446/14731 works */
      font-size: 0;
    }

    body
    {
      background-color: #000000;
      height: 100%;
      margin: 0;
      padding: 0;
    }

    #leftBar
    {
      margin-right: 400px;
      height: 100%;
    }

    #largeVideo
    {
      position: relative;
      width: 100%;
      max-height: 100%;
      background-color: red;
    }

    #rightBar
    {
      position: fixed;
      width: 400px;
      height: 100%;
      right: 0;
      background-color: blue;
    }
  </style>
</script>
</head>
<body>
  <div id="rightBar"></div>
  <div id="leftBar">
      <video id="largeVideo" autoplay="autoplay"></video>
  </div>
</body>
</html>
Gili
  • 86,244
  • 97
  • 390
  • 689

1 Answers1

1

I filed a bug report against Chrome (Version 26.0.1410.64 m) because I believe it is a bug: https://code.google.com/p/chromium/issues/detail?id=235189

If you look closely, you'll notice that the video element is being pushed above the right column. Firefox behaves correctly.

UPDATE: I've updated the testcase to work under incognito mode. I can now reproduce this issue under incognito mode with all extensions disabled under Chrome 26.0.1410.64 m.

UPDATE 2: Someone else has reproduced the problem under Mac so it's not just me: https://code.google.com/p/chromium/issues/detail?id=235189#c3

Gili
  • 86,244
  • 97
  • 390
  • 689
  • Works as I'd expect it to in Chrome 26, have you tried loading with no extensions or addons? – David Barker Apr 24 '13 at 21:23
  • 1
    @DavidBarker, are you running in incognito mode? This issue is only reproducible in normal mode for me, even though I disabled all `chrome://extensions`. Is there anything else I should try disabling? – Gili Apr 24 '13 at 21:29
  • no I'm running in normal mode with pendule, speed tracer and SO active... Not sure what else to suggest :( – David Barker Apr 24 '13 at 21:39