Answer the question
In order to leave comments, you need to log in
How can I make the "+" change to "-" when pressed?
The site has a horizontal menu, in the mobile version I made it to expand the categories "+", I can't figure out how to change it to "-" when I click on it,
so it doesn't want to work
.fa.fa-minus{
display: none;
}
.fa.fa-plus{
display: block;
}
.dropdown .open .fa.fa-minus {
display: block;
}
.dropdown .open .fa.fa-minus {
display: none;
}
Answer the question
In order to leave comments, you need to log in
you have the same selector described twice -.dropdown .open .fa.fa-minus
1) The selector itself is incorrectly specified, you need to write
.dropdown.open .fa.fa-minus {
display: none;
}
dropdown.open + .fa.fa-plus {}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question