Sane CSS adjustments are not possible

New home Forums Pro Add-on Troubleshooting Sane CSS adjustments are not possible

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #36556
    Goldener Westen

    Hey, I’d like to adjust some styles but as your plugin styles are enqueued in the footer it is pretty hard to make some sane CSS adjustments without using the !important declaration everywhere.

    Now, there is even a case where the !important declaration is not working as your plugin stylesheet also use one of them. I’d like to adjust the following CSS:

    .gm-style div { margin-top: 0 !important; }

    This is set in wp-google-maps-pro/css/wpgmza_style_pro.css?ver=7.04 Line: 19 (Honestly, I wonder why this is there?)

    In my child theme I try to overwrite it with:

    .gm-style div { margin-top: 10px !important; }

    Of course, this is not working as your plugin enqueues the styles in the footer and my theme does enqueue its styles in the header as every theme and child theme does. I could use the ID of the map to make the style declaration more specific but the purpose is to apply this style to every potential map.

    I highly recommend that your plugin enqueues styles in the header so that overwrites are easier as themes can load their stylesheets after your plugin styles.

    Hope you can reach out to me with a proper solution.



    Hi Felix,

    Thank you for getting in touch with us.

    Please use this code:

    .wpgmza_map .gm-style div { margin-top: 10px !important; }

    It uses .wpgmza_map so it should override all next declarations even in footer.

    Please let me know if it works.

    Best regards,

    Goldener Westen

    Hey Jarek,

    that worked well.

    However, enqueueing the plugin stylesheet in the header would help to use less !important declarations and saves time on figuring out which classes need to be combined to overwrite existing plugin styles. Eventually, this could be implemented with an on/off toggle in the settings.

    Thanks for your help,


    Hi there,

    Thank you for pointing this out. You can overwrite all style using css specifity but you’re right. It would be better to load style in the header. We’ll clean up this a bit and add it to future release.

    Kind regards

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.