z index used only on positioned items code example
Example: css z-index
#nav {
position: fixed;
...
z-index: 2;
}
#main {
position: absolute;
...
z-index: 1;
}
#nav {
position: fixed;
...
z-index: 2;
}
#main {
position: absolute;
...
z-index: 1;
}