2

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.

6

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

1
  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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