How To Change Cursor Highlight Color in Divi

by | Last updated Oct 28, 2024 | Divi Tutorials

Change Cursor Highlight Color in Divi

Do you ever drag your cursor over texts on some websites and wonder how they managed to achieve such a cool background color? The background color matches the website’s branding.

This cursor-highlight color is called text selection color.

In most cases, you might not notice the difference in color when you highlight or drag your cursor over the text of a website.

By default, most web browsers use different shades of blue as the text selection color.

If you don’t want your website visitors to see the same blue color when they highlight or drag the cursor over the text of your website, you can change it yourself.

The main reason why you may want to change this text selection color is just to complement the color of your website.

For instance, for this website, if you drag your cursor over the text, you will see the text in white color and the background in a color that matches the branding of this website.

How To Change Cursor Highlight Color in Divi

Let me show you how to change the text highlight color or text selection color for your Divi website with CSS.

  • Sign into your WordPress Dashboard.
  • Go to Divi > Theme Options > Custom CSS and paste the CSS Code below.
  • Click on Save Changes.

/*change color of text highlight*/
::-moz-selection {
color: #ffffff;
background: #0ECAD4;
}

::selection {
color: #ffffff;
background: #0ECAD4;
}

Pro Tip: How to Add CSS Code Snippets to the Divi Theme

Note:

  • The “color: #ffffff” is white for the text.
  • For the background color, you need to change the color of your choice. Or something that matches your branding.
  • Make sure the text selection color is visible with the background color on your website.

Well, that’s it!

Shop Divi Products

Buy nicely done Divi Layouts, Child themes, and extensions for your next Divi project.

Related Articles

How to Add Padding Around Featured Images in Divi’s Blog Module

How to Add Padding Around Featured Images in Divi’s Blog Module

If you're using the Divi theme for your WordPress website and want to customize the appearance of your blog posts page, one simple tweak you can make is adding padding around the featured images. This can help create a more visually appealing layout and better...

Divi Logo Guide: Everything You Need to Know

Divi Logo Guide: Everything You Need to Know

A professionally designed logo is a powerful branding asset that can leave a lasting impression on your website visitors. Research shows that a well-designed logo can boost consumer trust in a brand by an impressive 75%. But the question most people ask is – how do...

Leave a Comment

0 Comments

Submit a Comment

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

WP101 - FREE WordPress Tutorials

Enter your email address below to gain access to the FREE WordPress training.

You have Successfully Subscribed!

Pin It on Pinterest