How to Style a Single Divi Menu Item Without Using a Plugin

by | Last updated Oct 28, 2024 | Divi Tutorials

styling single menu item in divi

In some cases, you may need to make a single menu item look a little unique so as to attract attention. It may be a menu item like “Sign Up” or “Shop Now” link.

See, Divi theme, and almost other WordPress themes, don’t provide this option under the Theme Customizer. So, you will need to add a few lines of CSS to make this happen.

styling single menu item in divi

Instead of using the unique ID of the menu item, we will use a custom class to make the whole process a lot easier.

On your WordPress admin dashboard, go to Appearance >> Menus, the click on Screen Options at the top right of the screen.

Now, ensure that the box next to CSS Classes under Show Advanced Menu Properties is checked.

screen options

Go to the menu item you want to customize, then add the class db-custom-menu-link in the CSS Classes (Optional) field and save your menu.

adding css class

Finally, add the following CSS to your Divi theme options custom CSS box or in the child theme stylesheet.

.db-custom-menu-link a {
padding: 10px !important;
background: #328FF8;
color: #fff !important;
border: 2px solid #328FF8;
}
.db-custom-menu-link a:hover {
background: #fff;
color: #000 !important;
opacity: 1 !important;
}

You can be creative with the code and add any properties you want on the link. You can change the color, and even how the button behaves on scrolling.  

That’s it for now. To be able to receive more of these tips. Subscribe to my newsletter.

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