ajmajmajma ajmajmajma - 2 months ago 8x
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.



Try joining them together like this:

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