7

Might anyone know of a way to style the CSS of a popup used in Openlayers?

Using an OL popup method, returned is a div with an ID of

Would I just add that to my CSS and style, or might there be a better way?

user1040259
  • 6,369
  • 13
  • 44
  • 62

1 Answers1

6

Properties:

There are properties such as backgroundColor, border, opacity you can set directly.

Have you taken a look at the popupMatrix example?

JQuery:

In case you use jquery, you can reference the DOM Elements by doing:

popup.contentDiv
popup.groupDiv
popup.closeDiv

Reference

CSS:

Yes, and nothing is stopping you from using css like I demonstrate in this example:

http://jsfiddle.net/BLLqB/1/

Conclusion:

The better way is the one which works best for what you're doing. If you see that the available styling properties are not enough, use jQuery or CSS.

Gilles 'SO- stop being evil'
  • 104,111
  • 38
  • 209
  • 254
capdragon
  • 14,565
  • 24
  • 107
  • 153