Whenever the screen size shrinks, my navbar sections start getting closer together until they eventually disappear. I've implemented a button for a dropdown menu to replace the navbar links, but I can't seem to make it visible only on screens with a maximum width of 600px or less. Either it is displayed alongside the navbar links before they vanish, or it's not visible at all. Can someone help me out?
Below is the media query for this section:
@media (max-width:600px) {
#main-pic{margin: 0 0 0 -220px;}
#welcomesign{margin: 0 0 0 -40px;}
#navprojects{display:none;}
#navcontact{display:none}
#navartwork{display:none}
#navresume{display:none;}
#navhome{display:none;}
#3bd{visibility:visible}
}
And here is the HTML code:
<ul>
<a id="nav1" class="eight" href=index.html><img id="sgmainlogo" src="sgproject4.png" alt=SGproject style=55px;width:55px;position:absolute;left:10px;top:4px;></a>
<li id="navhome"><a id="nav" class="ten" href=home.html>Home</a></li>
<li id="navresume"><a id="nav" class="ten" href=resume.html>Resume</a></li>
<li id="navprojects"><a id="nav" class="ten" href=projects.html>Projects</a></li>
<li id="navartwork"><a id="nav" class="ten" href=artwork.html>Artwork</a></li>
<li id="navcontact"><a id="nav" class="ten" href=contact.html>Contact</a></li>
<div id="3bd" class="dropdown" style="visibility:hidden;">
<button onclick="myFunction()" class="dropbtn fa fa-bars"></button>
<div id="myDropdown" class="dropdown-content">
<a class="six" href="home.html">Home</a>
<a class="six" href="resume.html">Resume</a>
<a class="six" href="projects.html">Projects</a>
<a class="six" href="artwork.html">Artwork</a>
<a class="six" href="contact.html">Contact</a>
</div>
</div>
</ul>