I'm working on an assignment using media queries, and encountered an issue when I try to make the navigation bar of my website vertical for smaller screens.
I was expecting the each of the navigation links to take up a row, but instead they all stay on one row.
nav {
position: fixed;
z-index: 1000;
top: 0px;
text-align: center;
background-color: #eedfd4;
margin: auto;
width: 99%;
padding: 5px;
border-radius: 7px;
}
nav li {
list-style-type: none;
width: 10%;
text-align: center;
border-radius: 5px;
margin: 8px;
padding: 6px;
background-color: #D5BDAF;
transition: background-color 1s;
}
nav li:hover {
background-color: #d6b19b;
}
nav a {
text-decoration: none;
color: #876244;
}
@media screen and (max-width:759px) {
fig {
width: 100%;
}
footer {
width: 100%;
}
nav li {
display: block;
}
.himg {
display: none;
}
}
@media screen and (min-width:760px) {
body {
background-color: #cab9afc1;
}
}
<nav>
<ul>
<li><a href=../index/index.html>Homepage</a></li>
<li><a href=../about/about.html>About Us</a></li>
<li><a href=../locations/locations.html>Locations</a></li>
<li><a href=../recommended/recommended.html>Reccomended</a></li>
<li><a href=../apply/apply.html>Apply</a></li>
<li><a href=../contact/contact.html>Contact Us</a></li>
</ul>
</nav>