1

I use infobox to attach a div to about 20 markers on a map. The div contains a anchor that shows up via classname:hover. This works as expected but alas: I really would like to have the box, that pops up at :hover to trump all other content on the page in order to make sure, the content of the box is not behind anything else.

I have applied position and z-index to all relevant elements on the page and the popup boxes have z-index 1000 while all other are below 100. Still the marker-image (z-index 80) covers the box. I tried to change panes and have set the index for the marker by using setZIndex to 80 but to no avail.

boxText.innerHTML = '<p class=\"sheikh_flag\"> <a   style=\"z-index:1000\" class=\"sheikh\" href=\"index.php\"> Linktext  </a>  Text   </p>';

Is there a way to make sure, that anchor class sheikh is always displayed atop all others?

zettberlin
  • 11
  • 5
  • Can you please give us a demo of the issue. The infoboxes by default will be embedded into the floatpane, which is the most-top pane. There can't be anything in front of a infobox(except other infoboxes/infowindows). CSS-zIndex will not help here, because it will only have an effect related to the elements inside the floatpane. – Dr.Molle Aug 26 '13 at 12:33
  • The application is not to be published yet, sorry for that. – zettberlin Aug 28 '13 at 13:59
  • Anyway, your comment has cleared the issue some more I suspected, that CSS-z-index is in some way disabeled by the maps-API, now I know. Indeed the problem is, that the infoboxes are behind *other* markers when they pop up. Is there a way to place the markers in a lower pane and the infobox in floatpane? – zettberlin Aug 28 '13 at 14:02
  • As I said, when you use native markers there is nothing you have to do. Markers will be rendered in overlayImage-pane(z-index 3), and the infoboxes in floatPane(z-index 6), that's why no native marker can ever be in front of an infobox – Dr.Molle Aug 28 '13 at 20:45

1 Answers1

0

Z-index only works with elements that have position: relative / absolute / fixed

brutusmaximus86
  • 264
  • 2
  • 7