you need both:
position: relative;
z-index: 999;
each position:
position: relative;
or:
position: absolute;
etc
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:
position: relative;
z-index: 999;
the other uses:
position: absolute;
z-index: 1;
the layer using:
position: absolute;
z-index: 1;
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.