I got a problem with code looking like that:
<div class="outer">
<div class="inner">
Sample text
</div>
</div>
The outer DIV has margin/padding=0, the inner DIV has a margin (all 4
sides). What happens is that the margin does not position the inner DIV
more to the inside of the outer one, but creates a margin between the
outer div and its parent. When a border is added to the outer DIV, it
renders as it (IMHO) should do.
A sample page showing both the problem and the border-workaround, can be
found at http://www.torfbold.com/problem.html
This happens over here on Linux with Mozilla 1.6 and Opera 7.51.
According to my understanding of the CSS Box model
(http://www.w3.org/TR/REC-CSS2/box.html), this is not the correct behaviour.
I would really appreciate it if some could clarify that mystery for me.
Thanks,
Florian
--
Minimum Requirement #3: You know where you want to go tomorrow
(WEB.DE help-wanted ad: Linux Guru)
[------------ http://www.torfbold.com - POV-Ray gallery ------------]
<div class="outer">
<div class="inner">
Sample text
</div>
</div>
The outer DIV has margin/padding=0, the inner DIV has a margin (all 4
sides). What happens is that the margin does not position the inner DIV
more to the inside of the outer one, but creates a margin between the
outer div and its parent. When a border is added to the outer DIV, it
renders as it (IMHO) should do.
A sample page showing both the problem and the border-workaround, can be
found at http://www.torfbold.com/problem.html
This happens over here on Linux with Mozilla 1.6 and Opera 7.51.
According to my understanding of the CSS Box model
(http://www.w3.org/TR/REC-CSS2/box.html), this is not the correct behaviour.
I would really appreciate it if some could clarify that mystery for me.
Thanks,
Florian
--
Minimum Requirement #3: You know where you want to go tomorrow
(WEB.DE help-wanted ad: Linux Guru)
[------------ http://www.torfbold.com - POV-Ray gallery ------------]
Comment