I am experiencing an issue with the navigation menu on my website. Everything looks great in normal view, but when I resize the browser window to a smaller width, the menu ends up overflowing below the main content. I want the navigation menu to always display without overflowing, regardless of the size of the browser window.
Any advice on how to achieve this?
Thanks :)
#page-links-list {
/* Styles for the vertical navigation menu */
border-right: 2px solid rgb(255, 255, 255);
background-color: #000000;
list-style-type: none;
padding: 4% 0.25% 0%;
margin: auto;
position: fixed;
height: 100%;
float: left;
width: 12%;
font-size: 15px;
}
#page-links-list li {
/* Styles for each parent item in the navigation menu */
text-align: center;
padding: 1% 0%;
display: block;
width: 100%;
}
#page-links-list a {
/* Styles for each hyperlink in the navigation menu */
text-decoration: none;
text-align: center;
width: 100%;
display: block;
color: rgb(255, 255, 255);
overflow: hidden;
padding: 1% 1%;
}
#main a:link {
color: #ffffff;
}
#main a:visited {
color: rgb(245, 245, 220);
}
#main a:hover {
color: hsl(208, 100%, 97%);
}
#main a:active {
color: darkgray;
}
.page-links-list-sub {
/* Styles for expanding submenu under parent items */
max-height: 0px;
overflow: hidden;
transition: all 0.5s ease-out;
padding: 0%;
}
<nav>
<ul id="page-links-list">
<li><img id="navigation-menu-logo" src="assets/images/trust-logo.png" alt="The Tropical Rainforests Trust logo"></li>
<li><a href="https://www.facebook.com"><img src="assets/images/facebook-logo.png" alt="The Facebook logo."></a></li>
<li><a href="https://www.twitter.com"><img src="assets/images/twitter-logo.png" alt="The Twitter logo."></a></li>
...
... (ongoing list of menu items)
...
</ul>
</nav>