Click here to Skip to main content
15,879,535 members
Please Sign up or sign in to vote.
1.80/5 (2 votes)
See more:
I am using a WordPress theme and I am trying to add a background to a menu element. I am able to change the background but I need to change the font colour as well for the text to be visible. At the moment it just looks like an empty block.

Please help.

Website URI: https://ganguram.com/wordpress

Menu element to be modified: pan india

What I have tried:

CSS
li#shopkeeper-menu-item-3868.menu-item.menu-item-type-custom.menu-item-object-custom {
	color: #ffffff;
	background-color: #49488d;
}
Posted
Updated 20-Oct-21 4:52am
Comments
Member 15329613 19-Oct-21 9:40am    
You can use your browser's development tools to see what it applied. It may be that a css setting from somewhere else is overwriting this.
Primo Chalice 20-Oct-21 10:48am    
Thank you! It worked.
Member 15329613 20-Oct-21 10:52am    
You're welcome. Glad you figured it out.

1 solution

As mentioned in the comments, use the browser's developer tools to see what actually got applied. It may be that a different css selector in a different file is overwriting it.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900