Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer 1

up vote 6 down vote accepted

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

share|improve this answer
    
Ha! Oh wow, that was dumb of me... But yes, this worked, thanks. I forgot to position it :) –  R Thiede Sep 27 '11 at 8:45
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.