with the 10px margins, the outer div would be 150px and the inner div would be 130px (plus 10px either side = 150px)
and that is without even considering the 10px left and right margins ..
think of it like this:
Code:
||<<-------------------150px----------------->>||
|| ||
|| 10px margin | 120px INNER DIV | 10px margin ||
|| ||
does that make sense?
lol there are so many questions that need to be answered so please bear with me :P
- have you considered giving the inner div its own id or class?
- what browser are you using? does this happen on every browser? have you tried different browsers?
- darn ive forgot what else i was supposed to ask :/ sorry
it is a long shot that i thought of before i remembered that padding is an internal border (so affects content inside the internal div), but maybe you could try switching the order in which the width and padding around?
the reasoning behind it is that
maybe (and it is a long shot) the width is being calculated from the left -- i mean, the width of the div is calculated, then the extra padding is added onto it ?
Quote:
width:100%;
margin:auto;
padding:5px;
|