Need help with the pseudo element in navbar
https://codepen.io/Arslan-Akbar/pen/poOMadb here the link to the codepen.
I want the pseudo element which appears on hover to have transform scale X of 1 when it has active class on it. Is there any way i can use css selectors for this I tried using something like
.nav-items::before.active{
transform:scaleX(1);
}
it didn't seem to work.
9 Replies
the correct syntax for that is
.nav-items.active::before
the pseudo element is on the .nav-items and i've tried using this syntax. it didn't work.
where is the .before then?
on the .nav-items class
u can see it in the code pen
this works for me:
oh
mb
.active isn't the class you're using, I assumed it was because that's what you listed in your question
thank you.
np 🙂