2

Is it possible to reference the box in the CSS to change the colour of the layer selection box? Would be great to change it away from the standard white.

enter image description here

1 Answer 1

3
.leaflet-control-layers-expanded { background: #ff0000; }

make sure you add this after leaflet css is loaded so that it overrides the default style

in your for example:

<style>.leaflet-control-layers-expanded { background: #ff0000; }</style>

or else edit leaflet.css directly (line 302 in this example)

1
  • Ah thank you very much! I should have thought to look in the leaflet css.. Have a great day :)
    – Jamie
    Jan 12, 2016 at 10:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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