I have 2 nested divs and the outer one has a width: 100%
<div id="#outer" style="width:100%; border:1px">
<div id="#inner" style="width:100%; border:1px; margin:4px">
something inside ...
</div>
</div>
But in this case, the inner div exceeds the width of the outer by 8px (margins). How to make an inner div to get the width of the outer div minus 8px margin?
PS All styles in a separate class in my case, here I put CSS in the style attributes just for simplicity.
source
share