ajmajmajma ajmajmajma - 1 year ago 163
CSS Question

How to change :before on hover state

I have some css I am working with, some links to be exact that have some :before on them for some aditional styling, I want the before to change background color when I hover on the .

Here's my poor attempt at it:

nav > li > a:hover a:before {
background-color: #fff


I just want to change the background color of the a:before when i hover over the a.


Answer Source

Try joining them together like this:

nav > li > a:hover:before {
    background-color: #fff;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download