Search Events Calendar Child Theme for Divi Documentation

Search for answers or browse our knowledge base.

< All Topics
Print

How to change background color of the menu’s last child item?

To change the background color of the last menu item, you can add the following CSS code to your WordPress theme:

  1. Navigate to Appearance > Customize in your WordPress Dashboard.
  2. Select Additional CSS.
  3. Paste the CSS code into the provided text area.
  4. Click Publish to save your changes.
.et_header_style_left #et-top-navigation .header-registration-btn a {
    border-color:    #FF0000 !important;
    background-color:#FF0000 !important;
}

Note: In the above code you can change the color according to your preferences.

Output:

To change the color on the hover state add the below CSS

.et_header_style_left #et-top-navigation .header-registration-btn a:hover {
    border-color:     #000 !important;
    background-color: #000 !important;
}
Was this article helpful?
0 out of 5 stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
Please Share Your Feedback
How Can We Improve This Article?