1

I am using the InfoBox plugin, as described here. What I'd like to do is to apply some custom css rules to the close icon of the infoBox. The canvas div for my map is called "mapCanvas", so here is the css selector I am trying to use:

#mapCanvas div.infoBox > img {
}

However, this won't apply the style - and it's not that its being overwritten by another, more specific selector. It's not even picking up the class at all when rendered! Does GMaps infoBox/infoWindow class have some process that removes all custom CSS classes assigned to the object on creation? Any ideas?

AlexZ
  • 11,515
  • 3
  • 28
  • 42
  • Theoretically, it looks correct to me. What css properties are you trying to give the ``? – ScottS Jul 23 '13 at 01:59
  • I'm just trying to position it absolutely, rather than setting the `closeBoxMargin` property specified by InfoBox. Its very strange - I guess its something specific to my app, I'll just have to keep plugging away at it. Its not the end of the world really, I could style it other ways. – AlexZ Jul 23 '13 at 03:04

1 Answers1

1

The style for the close-icon will be set via script(inline), you must add a !important-rule to be able to override it:

#map_canvas div.infoBox >  img {
   position:absolute !important;
}
Dr.Molle
  • 116,463
  • 16
  • 195
  • 201