Ive followed the amazing free code camp tutorial of making a nav bar and have just practiced it like 10 times. The only thing im not sure of is that the logo hovers with the rest of the parts of the nav bar and im not sure how to make only the logo not hover.
@NinaLoeterman, please let me know if I am following you. You want to remove the background (#d9e6f2) if the pointer hovers the logo, right? if so, I would do this, not sure if it is the more elegant way but it works
You have your logo set as an anchor tag <a>, so it uses the same styling as the other anchors from your nav a and nav a:hover selectors.
One way to stop the hover effect, if it does not have to be an anchor, is to change it into a <p> tag, and then add p to the nav a selector: nav a, p to give it the main styles but not take the hover.
If it has to be an anchor, then @leovago has given a suitable solution.
I would not suggest using that CSS. It may seem like a simple solution to your problem, but it’s not the right solution. The right solution is to target the elements you want the hover on, simple as that.
What you are basically doing is creating a problem that isn’t there which you then need a solution for. The real solution, however, is not to create the problem, to begin with.