you need both:
has it's own layer on the page. the z-index property sets the stacking order for the specified layer.
take this as an example, you have 2 dives, one uses:
the other uses:
the layer using:
will stack on top of the other since the absolute layer is on top of the relative.
z-index alone makes no difference though, since you don't specify which layer the z-index belongs to.