I am confused about how to get border-box
working in CSS.
Basically I want two divs stacked next to each other: a left-hand #sidebar
with a fixed width, and the remainder of the page (the #results
element) taken up by text.
I have done this by floating both divs left, using a fixed width of 220px on #sidebar
, and setting width: 100%
, left-margin: 220px
, and box-sizing: border-box
on the #results
element.
However, the #results
element is too wide by 220px - it looks as though box-sizing
is not being applied at all.
This JSFiddle demonstrates my problem: http://jsfiddle.net/m8KFe/3/