Fix the Menu Link Colors on Divi Single Page Navigation

Written by Dan Mossop

The Divi theme includes the ability to create single page websites with menu links that link to specific sections in the page. This lets your users easily navigate around a long single-page site. You might notice, however, that the link colors sometimes don't look quite how you expect.  

In the default Divi header, links to the current page are highlighted. However, on a single-page site this can mean that most or all links are highlighted, which can be confusing to users. This can be fixed using either the Divi Booster plugin or custom CSS.

An Example of the Problem

The following example shows the coloring of a single page menu links after clicking onto the "hours" section of the "Visit Us" page. In this case all of the links are highlighted, as they are all links to the current page), except for the "hours" link which has been marked as visited and is now shown in black. This gives almost the opposite effect of what you may expect – i.e. that the most recently clicked link is highlighted while the others are a more neutral color unless hovered.

Fix the Menu Link Colors on Divi Single Page Navigation using Divi Booster

Divi Booster adds hundreds of new features to Divi, including the option to easily fix the menu link colors in single page nav menus. Here's a walk-through of how to use this Divi Booster option:

Get Divi Booster

Our popular Divi Booster plugin adds hundreds of new features to Divi, including the one we need here.

If you haven't already done so, grab your copy of Divi Booster now.

Divi Booster Plugin

Upon purchase, you'll be provided with a copy of the divi-booster.zip plugin file. Download the plugin zip file to your computer, ready for installing in the next step.

If you have already purchased Divi Booster, you can obtain the Divi Booster plugin zip file from within your Divi Booster account.

Install Divi Booster

The plugin zip file can then be uploaded to your own site at:

WP Admin > Plugins > Add New Plugin > Upload Plugin

There, click "Choose File", locate and select your divi-booster.zip file and then click "Install Now". Once uploaded, click the button to activate the plugin and the feature will be added to Divi.

Open the Divi Booster Settings Page

Now, in your WordPress dashboard, look for the "Divi" option in the left-hand menu, then click on it. Under the Divi menu, you'll find "Divi Booster” – select it to open the Divi Booster settings page. This will bring up Divi Booster's main settings that can be applied globally to Divi.

Enable the "Fix menu link colors on single page navigation" Option

In the Divi Booster settings, navigate to "Header" then "Main Header". Here you'll see a range of options for modifying the default Divi header. The one we need is the one called "Fix menu link colors on single page navigation". Check the box beside it to enable it.

This setting adjusts the classes applied to the menu items, meaning that it will automatically use the existing colors from your menu settings – there's no need to manually set any colors.

Save the Divi Booster settings

Now, save your Divi Booster settings by clicking the "Save Changes" button at the top of the settings page. This will apply the updated Divi Booster settings to your site.

View the Result

Now, view your menu on the front-end and you should see that the link colors behave in a more intuitive way, with links having your menu's neutral text color until you hover over them.

Fix the Menu Link Colors on Divi Single Page Navigation using CSS

If you're comfortable adding code to your site, you can adjust the styles of the menu items to create a more intuitive color scheme using CSS. Here's how to do it.

Open the Divi Theme Options

Divi's Theme Options include various settings for configuring Divi's overall behavior. To open the theme options, from your WordPress dashboard, click on "Divi" in the sidebar menu, then the "Theme Options" sub-menu item.

Navigate to the "Custom CSS" Setting

Now click on the "General" tab in the Divi Theme Options, which brings us to Divi's main site-wide settings. Scroll to the bottom and you should see a box called "Custom CSS" which allows you to add your own CSS code alongside that already added by Divi:

Add the CSS Code to Fix the Single Page Nav Link Colors

Enter the following CSS code into the "Custom CSS" box. It will set the normal unhovered link color to black and make the links blue when hovered. You can adjust these colors to fit your design.

#top-menu li.current-menu-item > a { 
	color: black !important; 
} 
#top-menu li.current-menu-item > a:hover { 
	color: #2ea3f2 !important; 
}

Save the Divi Theme Options

To apply the changes, we need to save the Divi Theme Options. This can be done by clicking the "Save Changes" button at the top or bottom of the Divi Theme Options area:

View the Result

Now, if you view your menu on the front-end, you should see that the links have a more normal feel to them, with only the currently hovered link being highlighted. 

Conclusion

So there we have it, two ways to correct the link coloring on the Divi single page navigation menu: using either Divi Booster or custom CSS. I hope this has helped improve your single site menu design! If you have any questions about it, please ask in the comments. 

Streamline Your Divi Workflow!

Copying images and content directly from your clipboard into Divi has never been easier. Say goodbye to the cumbersome save-and-upload routine and hello to streamlined efficiency.

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, 

1 Comment

  1. As always, Dan, this fix "just works". Thanks for solving yet another vexing Divi problem!

    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 Posts

Hide the Page Title in the Hello Elementor Theme

Hiding the page title in the Hello Elementor theme allows you to create a cleaner and more customized page layout, free from default headings that may not fit your design. This is particularly useful for landing pages or custom content layouts where the default page...

How to Hide a Divi Module When Scrolling Up or Down

In this quick tutorial, I’ll show you how to hide a Divi module when scrolling in a specific direction (up or down), so that the module only shows when you want it to. This is especially useful when using Divi’s Scroll Effects feature and you have a effect you want to...

Fade a Divi Image Module Edge into the Background

Want to create a stylish fade effect on your Divi image module—where one side fades smoothly into the background? With a bit of CSS, you can make any edge (or corner) of the image fade out: top, bottom, left, right, or even diagonally.Fade a Divi Image Module Edge...

Hide the Header and Footer in the Hello Elementor Theme

Removing the default header and footer from your Hello Elementor theme allows for a streamlined and distraction-free website design. This is especially useful when creating unique landing pages, full-width layouts, or custom headers and footers with a page builder. In...

Setting up the Divi Password Box Module

Setting up password protection on a page can help you control access to sensitive or private content in WordPress, allowing only authorized visitors to view certain sections. With the Divi Password Box module, you can replace the plain Divi password form with a fully...

Random Posts