Search Events Calendar Child Theme for Divi Documentation
Search for answers or browse our knowledge base.
How to change background color of the menu’s last child item?
![](https://diviextended.com/documentation/wp-content/uploads/2024/04/last-child-color-1024x277.webp)
To change the background color of the last menu item, you can add the following CSS code to your WordPress theme:
- Navigate to Appearance > Customize in your WordPress Dashboard.
- Select Additional CSS.
- Paste the CSS code into the provided text area.
- 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:
![](https://diviextended.com/documentation/wp-content/uploads/2024/04/last-child-customization-1024x276.webp)
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;
}