Greyscale Google Maps in the Divi Map Module

Written by Dan Mossop

The Divi Theme comes with a map module that makes it easy to embed Google Maps into your webpages. Here's a quick cross-browser CSS snippet for displaying the map in greyscale rather than the standard Google Map colors:

1.et_pb_map_container {
2 filter: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'><filter id='grayscale'><feColorMatrix type='matrix' values='0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0'/></filter></svg>#grayscale");
3 filter: grayscale(100%);
4 -moz-filter: grayscale(100%);
5 -ms-filter: grayscale(100%);
6 -o-filter: grayscale(100%);
7 filter: gray; /* IE6-9 */
8 -webkit-filter: grayscale(100%);
9}

Transform Your Pages with Divi Show / Hide Button!

Unleash the full potential of your Divi site with the Divi Show / Hide Button Module. Control the visibility of sections, rows, or modules with ease, create engaging tabs, and style your buttons just like any other Divi button. Perfect for keeping your pages clean and interactive.

About Dan Mossop

Dan is a Scottish-born web developer, now living in Brisbane with his wife and son. He has been sharing tips and helping users with Divi since 2014. He created Divi Booster, the first Divi plugin, and continues to develop it along with 20+ other Divi plugins. Dan has a PhD in Computer Science, a background in web security and likes a lot of stuff, 

8 Comments

  1. My map on the website is not working. This issue was started from last week and I tried adding a new PIN and it worked till last week. When I check it today, it again stopped. Any help would be highly appreciated.

    Reply
    • Sorry to hear that Joseph. Are you able to give me a link to the page with your map (or explain to me where it should appear)? I can't see it on the site linked in your comment, but I'm not sure if this is where I need to be looking… Also, when you say it's not working, do you mean it doesn't show up at all, or that it is displaying incorrectly in some way? Cheers!

      Reply
  2. hi , Markup in CSS not allowed …

    Reply
    • .et_pb_map_container {

      filter: grayscale(100%);
      -moz-filter: grayscale(100%);
      -ms-filter: grayscale(100%);
      -o-filter: grayscale(100%);
      filter: gray; /* IE6-9 */
      -webkit-filter: grayscale(100%);
      }

      with just this it works

      Reply
      • Hi Mauro, it's not actually HTML markup. Instead, it's an inline definition of an SVG overlay, which is used to perform the grayscale operation on IE 10. If you don't care about IE 10 support, it can be omitted as per your version which will work on pretty much every other browser out there. Thanks!

        Reply
  3. Where should this be pasted?

    Reply

Submit a Comment

Comments are manually moderated and approved at the time they are answered. A preview is shown while pending but may disappear if your are cookies cleared - don't worry though, the comment is still in the queue.

Your email address will not be published. Required fields are marked *.

We may earn a commission when you visit links on our website.

Latest From Divi Booster

Enable Automatic Looping for YouTube Videos in the Divi Video Module

Enabling automatic looping for YouTube videos in your Divi video module ensures that content plays seamlessly and continuously without interruption. This feature can enhance user engagement, highlight key information, or create dynamic visual effects on your website....

Hide Video Controls in Divi Video Module

Disabling YouTube video controls in the Divi Video Module helps create a seamless, distraction-free viewing experience for your site visitors. This approach is useful when you want full control over how your video content appears and is interacted with on the page, or...

Mute YouTube Videos by Default in the Divi Video Module

In the Divi Video Module, starting your YouTube videos muted by default can create a more user-friendly browsing experience on your webpage. It is particularly beneficial for reducing distractions, enhancing visitor engagement, and providing a seamless content preview...

Autoplay Videos in Divi Video Module

Enabling videos in your Divi video module to start playing automatically can enhance both the site's design and user engagement. To ensure full compatibility with browser requirements, such as Chrome's autoplay policy, it's often necessary to start your videos muted...

How to Add the Post Status in Divi's Dynamic Content

Divi's Dynamic Content feature is great for enhancing your post/page templates with post-specific information. While Divi includes an option to show information such as the Post Created Date using Dynamic Content, there is no equivalent option for the Post Status....

Random Divi Posts