Tee Famakin Tee Famakin - 2 months ago 6
CSS Question

How to change the color of WordPress navigation on hover

I am developing a website using a thrive theme on WordPress. I am trying to change the on hover color on the blog page specifically because it's built differently from the other pages.

Presently on hover it goes white from black which isn't what I am trying to achieve.

I searched online and saw some articles and code snippets which have brought me to trying this

header nav ul li a : hover {
font-family: 'Open Sans', sans-serif;
color: #000;
display: block;
font-weight: lighter;
font-size: 14px;
text-transform: capitalize;
position: relative;
}

header nav > ul.menu > li > a : hover {
color: #373737;
font-weight: lighter;
}


I have applied
: hover
to the navigation element to try to change the color on hover, but it doesn't work.

Is there anything I am doing wrong here? The site is at

http://stefanjames.com/blog/

Answer

You need to remove the spaces around the pseudoclass : selector in your CSS, so that it reads:

header nav > ul.menu > li > a:hover

Comments