[GIS] Why would Openlayers always render over other divs

openlayers-2web-mapping

I'm having trouble getting an Openlayers div to allow other divs to appear above it.

Having tried the solution proposed here as well as the more classy-looking one here, I haven't had any luck yet. Openlayers always orders itself over other divs. I've also set the z-index for my other div (which I want on top) as high as it goes, still no effect.

Is there somewhere it could be getting overridden? Or some setting that needs an extra trick to get rid of?

I have asked this question on StackOverflow as well, where it's arguably more relevant. I'm only posting this here because someone here may have specific Openlayers experience on this matter.

Best Answer

To handle a z-index CSS property, the element must be positioned. It means it must take the value absolute, fixed or relative.

here comes an example :

#map {position:absolute;z-index:0}
.popup {position:absolute;z-index:2}

You can post your code or provide a link if you need any help