In the following four test cases there are two relative boxes (with light red and blue semitransparent background), partially overlapping (the second has a negative top margin.) Each contains an absolute child box (with solid red and blue background), positioned to create some overlapping.
In the following case the parent boxes are not relative, there are intermediate relative child boxes, with z-index 1 on the one in the red parent. This allows to get also in IE7- the desired visual result of case 2 above: solid red box above the blue boxes without its ancestor (now grand-parent) being above them.
CSS tests home