Jump to content
Sign in to follow this  
gayatriom

Change active and hover colors of specific menu items

Recommended Posts

gayatriom

I'm trying to change the active and hover colors of menu items. I searched the forums and tried all the solutions, but none seem to work for me. I tried the below and both are unresponsive. #menu-item-132.main-nav li.current_page_item a{background-color: #670308 !important;} #menu-item-132:hover { background-color: #670308; }

Share this post


Link to post
Share on other sites
gayatriom
hover is working ... #menu-item-137 a:hover{background-color: green;color:white;} #menu-item-135 a:hover{background-color: yellow;color:grey;} #menu-item-138 a:hover{background-color: orange;color:white;} #menu-item-332 a:hover{background-color: red;color:white;} #menu-item-134 a:hover{background-color: #2b4547;color:white;} Now for current page :)

Share this post


Link to post
Share on other sites
catrina
[code]#menu-item-132.main-nav li.current_page_item a{background-color: #670308 !important;}[/code] ^ The selector "#menu-item-132" shouldn't go first. It should look something like this: [code].main-nav li.current_page_item.menu-item-132 a{background-color: #670308 !important;}[/code] Lastly... [code]#menu-item-132:hover { background-color: #670308; }[/code] ^ This code also needs some revision. The selector needs adjustment and the "a:" preceding "hover" is missing so it should look like this: [code].main-nav #menu-item-132 a:hover { background-color: #670308; }[/code] For further reference on CSS structure, please see here: http://www.w3schools.com/css/css_id_class.asp (The rest of the documentation here is helpful, too)

Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×