1. z-Index only works for positioned elements:
So, value with
position:absolute, position:relative, or position:fixed will respond to z-Index.
2. If you are setting z-index to menu kind of code and the element you are setting z-index is a kind of overlay when user hover over a link (main menu) then there is a chance that overlay is a part of parent (visible) menu. If this is the case then check whether you have
overflow:hidden set on parent! If this is the case then try removing overflow:hidden for the time being and hope your z-index starts working.
IE7 and z-index trouble:
This is bugged me for too much. zIndex was not working on IE7 and due to that overlay/floating div was coming behind many items on the page. After much research I have found two properties to use. One is "zoom:1" and other is setting higher z-index to parent of floating element. Second setting has saved me. About this 2nd hack I got the help from here.
So,suppose you have this kind of HTML:
and Div with id=2 is going to create floating box. So set higher z-index to div=1 than div=2. Like Div=1 z-index=2000, and Div=2 z-index=1000.
Here is a good explanation of z-index which can avoid problems related to z-index.