• Resolved heidimtl

    (@heidimtl)


    The leaflet map from leaflet map plugin is going over the main menu and I’m currently trying to get it to go behind. There is a CSS file called leaflet.css where it’s pulling information from and in that file there is a line of code that says z-index: 400 and if i turn it to zero on inspector it goes behind the menu.

    I need a way to override that line of code and make the plugin pull in that information instead, or some other alternative way of getting it to go behind the menu. Any help would be appreaciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor hupe13

    (@hupe13)

    To override any css in https://unpkg.com/leaflet@1.7.1/dist/leaflet.css you can use the customizer “Additional CSS”. Maybe you must write “!important”. e.g.
    .leaflet-pane { z-index: 0 !important; }
    I don’t know if .leaflet-pane is the right option for this, you have not provided a link.

    • This reply was modified 4 years, 1 month ago by hupe13.
    Thread Starter heidimtl

    (@heidimtl)

    Thanks for replying, that worked! I would’ve ideally wanted to make/edit a file in the child theme using WinSCP but I tried yesterday and none of it seemed to override the original CSS so I just gave up.

    .leaflet-pane was fine but it didn’t move the zoom controls behind the menu so I changed it to .leaflet-container and that did it.

    • This reply was modified 4 years, 1 month ago by heidimtl.
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Leaflet map z-index and css’ is closed to new replies.