Hire me for any WordPress works

To make a particular menu item unique or add a background color to it in Divi, you can follow these steps:

Method 1

  1. Log into WordPress Admin: Log in to your WordPress admin panel.
  2. Access Divi Theme Options: In the WordPress dashboard, go to “Divi” on the left-hand menu, then click on “Theme Options.”
  3. Enable Custom CSS: In the Divi Theme Options, there should be a section called “Custom CSS.” Here you can add custom CSS code to style your menu item (Check Step 4). You’ll use CSS to target the specific menu item and apply the background color.
  4. Identify the Menu Item: Inspect the HTML source of your menu to identify the class or ID associated with the menu item you want to style. To do this:
    • Right-click on the menu item in your browser.
    • Select “Inspect” or “Inspect Element.”
    • Look for the HTML code that corresponds to the menu item. It might look something like <li id="menu-item-123" class="menu-item">.
  5. Write Custom CSS: Once you’ve identified the class or ID, you can write custom CSS code to style the menu item. For example, if your menu item has the ID “menu-item-123” and you want to give it a background color of blue, you can use the following CSS code:
    • #menu-item-123 {
      background-color: blue;
      }

  6. Apply the CSS: Paste the custom CSS code into the “Custom CSS” section in Divi Theme Options.
  7. Save Changes: Once you’ve added the CSS code, make sure to save your changes in the Divi Theme Options.
  8. Preview and Adjust: Go to your website’s front-end and refresh the page to see the changes. We’ve provided a solution without concerning ourselves with the visual appearance of menu items, as this can differ across various websites. Thus, it’s a versatile solution that can be customized to meet your specific requirements.

Method 2

  1. Select the Menu:
    • Go to your WordPress dashboard.
    • Navigate to “Appearance” > “Menus.”
    • Select the menu you want to style.
  2. Add a class:
    • Give a CSS Class name as you want (for ex: unique-menu-item)
  3. Write Custom CSS: You can write custom CSS code to style the menu item. For example, if you want to give it a background color of blue, you can use the following CSS code:
    • .unique-menu-item {
      background-color: blue;
      }

  4. Apply the CSS: Paste the custom CSS code into the “Custom CSS” section in Divi Theme Options.
  5. Save Changes: Once you’ve added the CSS code, make sure to save your changes in the Divi Theme Options.
  6. Preview and Adjust: Go to your website’s front-end and refresh the page to see the changes. We’ve provided a solution without concerning ourselves with the visual appearance of menu items, as this can differ across various websites. Thus, it’s a versatile solution that can be customized to meet your specific requirements.
Visited 1 times, 1 visit(s) today