Vertical Negative Margins
- container with hasLayout and padding: 50px 10px 10px 10px
- box one with no margins
- box two with margin-top:-40px
- box three with margin-top:-60px
- box four with position:relative; margin-top:-60px
- box five with position:relative; top:-60px
- container without hasLayout
IE6-/Win: Crops the part of the box outside the container (can be fixed with relative.)
Problems if the container has no Layout.
In cases 3 and 4 the container's height is:
60px (as if the padding 50+10 were incompressible) in Moz, Saf, Op9, IE7, IE5M;
~50px in IE6W, Op7-8
Related:
CSS tests home