Let's say I have two div inside another:
And let's say I want my inside-divs to be the exact same width as each other, but the outside div has a border and padding.HTML Code:<div class="outside"> <div class="inside"> </div> <div class="inside"> <div class="clear"></div> </div>
Code css:.clear { clear:both; } .outside { width:400px; border:1px; padding:9px; } .inside { padding:0px; margin:0px; width:50%; float:left; }
Will the width calculation for the .inside take into account the border and padding? Will it be 50% of 400 (200 px wide) or will it be 50% of (400-border-padding) = 50% of 380 = 190px wide?


Reply With Quote




OK, it isn't that sneaky... 

Bookmarks