Search code examples
cssinternet-explorerhtmlstylesheet

CSS divs width 50% not working in IE


I'm unable to get this working in IE, the second child doesn't remain in the same line.

HTML:

<div class="outer">
  <div class="inner">left</div>
  <div class="inner">right</div>
</div>

CSS:

.outer
{
  width: 100%;
}

.inner
{
  float: left;
  width: 50%;
}

Solution

  • Change it to width: 49.9%. Well documented bug in IE.