I have two div-Tags, one contains the header with a logo and the other is an information div. The logo should always be on top, but it isn't.
On both I've set a z-index. The header has a z-index of 500, the info has a z-index of 200, as it should be unterneath the logo.
In CSS:
div#logo { position:fixed; z-index: 500;}
div#markerInformation {position: absolute; z-index: 200;}
The result I get is the opposite, you can see that the logo is underneath the info:
To see it in action, you can have a look here: http://www.dominikamon.com/location/#f4ec7efc-d27a-4767-910b-f1af9a5547a8,4,52.231789,21.006128
Note that the css definition of div#logo is:
div#logo {
position: absolute;
z-index: 500;
}
but as soon as you scroll down, there is a jQuery event bound to "scroll" that sets the position:fixed.
I already checked out some posts that should solve the issue, such as:
- z-index not working with fixed positioning
- How does z-index and position fixed work together in css
- Position absolute has greater z-index than position fixed
Maybe I missed the point in one of them, but i couldn't manage to get it working?