z-index
value to RP and AP blocksz-index:1
to AP1z-index
to both AP blocksz-index:11
to RP1z-index:21
to RP1z-index
to RP2 than to RP1, but identical z-index
to AP1 and AP2z-index
where RP2 > RP1, and AP2 < AP1, both being higher then any RP'sFirst an example where (AP1 = AP2) > RP1, RP2
This is relatively positioned block, with z-index:10
This is absolutely positioned block, with z-index:15
Content between the RP blocks... Content between the RP blocks... Content between the RP blocks... Content between the RP blocks...
This is relatively positioned block, with z-index:12
This is absolutely positioned block, with z-index:15
Content after the second RP block... Content after the second RP block... Content after the second RP block... Content after the second RP block...
Another example where (AP1 = AP2) < RP1, RP2
This is relatively positioned block, with z-index:10
This is absolutely positioned block, with z-index:5
Content between the RP blocks... Content between the RP blocks... Content between the RP blocks... Content between the RP blocks...
This is relatively positioned block, with z-index:12
This is absolutely positioned block, with z-index:5
Content after the second RP block... Content after the second RP block... Content after the second RP block... Content after the second RP block...
Another example where RP1 < (AP1 = AP2) < RP2
This is relatively positioned block, with z-index:10
This is absolutely positioned block, with z-index:11
Content between the RP blocks... Content between the RP blocks... Content between the RP blocks... Content between the RP blocks...
This is relatively positioned block, with z-index:12
This is absolutely positioned block, with z-index:11
Content after the second RP block... Content after the second RP block... Content after the second RP block... Content after the second RP block...
If RP1 was 12, and RP2 was 10, all would still behave properly.
RP = relatively positioned element
AP = absolutely positioned element