Divi Visual Editor: Adding a hover border to modules

The recent release of the latest version of the Divi Theme brings us the visual editor, a powerful new way to edit webpages directly. One of my favorite features of the visual editor is that it allows you, via a border which appears on hover, to see exactly where your sections and rows start / finish. This makes it great for figuring out things like where that stray padding is coming from.

One thing, I thought would be useful is to have the same type of hover border on modules within the visual editor. That way, you can easily tell what is part of the module, and what isn't.

I've come up with the following CSS for doing so:

It simply adds a border to top level modules upon hover. I've done it using the :after element so that the module's position on the page isn't affected at all – where you see the bordered module in the visual editor is where it'll appear on the page.

If you don't want to manually add the CSS to Divi, I've added it as a one-click option in Divi Booster, as of version 2.3.2. You'll find it in the Divi Booster settings page under "Divi Builder > Visual Builder":

Thanks to Glen for pointing out the need to set the z-index to ensure the module text remains editable.

This post may contain referral links which may earn a commission for this site

Divi Booster

Hundreds of new features for Divi
in one easy-to-use plugin

5 Comments

  1. Wove, great feature, i take it as bug in Divi builder, hats up

    Reply
  2. This is a great feature, so useful and fix a lot of frustration, thanks !

    Reply
  3. Thanks Dan, a good feature to include in Divi Booster. I must admit some frustration when creating complex pages in Visual Builder. Understanding text module boundary's was an issue.

    Reply
  4. This is a GREAT idea.

    I´m mad that I can´t make it work, but it´s great :)

    The code goes in Divi "options" no? in "custom css"?

    Reply
    • Ok, It´s done.

      I was not refreshing the cache :P

      Man, this is awesome, thanks!

      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 *.