header {
display: flex;
justify-content: space-between;
}
nav {
display: none;
}
header svg {
width: 3em;
margin-top: -6em;
cursor: pointer;
}
<div>
<header>
<a href="#" class="logo">Footwear<span>Company</span></a>
<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Boots</a></li>
<li><a href="#">Athletes</a></li>
</ul>
</nav>
<svg class="close" viewBox="0 0 48 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M24 32H0V26.6667H24V32ZM48 18.6667H0V13.3333H48V18.6667ZM48 5.33333H24V0H48V5.33333Z" fill="white"/>
</svg>
</header>
Even though I targeted the ul and li elements within nav, the svg is still not visible. It's puzzling that the cursor property works even when the content is hidden.
I aim to conceal the nav section without impacting the display of the svg.