CSS style property z-index determines the stack order of an element overlapping with others. There might be times when you find it not working for you and element with a bigger z-index falls behind one who has a smaller one.
Frustrating but why?
First, make sure the elements who has z-index property also has position:relative or position:absolute.
z-index simply doesnâ€™t work on elements who are position:static which is unfortunately also the default position style for all HTML elements if you donâ€™t specify otherwise.
Now is it working correctly?
Well, to understand more about the z-index thingy, head to here.