You have the img
inside #nav-icon
hidden. You don't have the actual <a>
wrap hidden though. Since it's set to inline-block
, it can display when there is nothing inside it. Change the display:none
to be on the actual #nav-icon
instead of #nav-icon img
, and you'll be good.
You might run into issues of conflicting display
rules though, because you are applying rules with different selectors on the same element. #nav a
and #nav-icon
are the same thing, but one might overrule the other. To make sure you have it selected correctly, the second should include all previous selectors, which would be #nav a#nav-icon
.
Change:
#nav-icon img {
display:none;
}
To:
#nav a#nav-icon {
display:none;
}