The issue at hand arises from the fact that padding
and border
are not considered in width: 100%
.
If you intend to absolutely position #exp_wrap
, follow this solution: http://jsfiddle.net/thirtydot/USvTC/1/
I eliminated width: 100%
on .bar_wrap
/#exp_wrap
, and introduced right:5px;
on #exp_wrap
.
A block element like a div
has a default width: auto
, taking up the entire available horizontal space. This behaves similarly to width: 100%
, but includes padding
and border
within the calculation of width: auto
.
If #exp_wrap
doesn't require absolute positioning, try: http://jsfiddle.net/thirtydot/USvTC/2/
Once again, I removed width: 100%
on .bar_wrap
/#exp_wrap
, swapped out
position:absolute; top:5px; left:5px;
with
margin: 5px;
, and included
overflow: hidden
on
.container
to prevent margin collapsing.