Trying to create a demo where the scrollbars are removed when resizing smaller, but adding overflow: hidden causes issues with sub-menus.
HTML
<nav>
<ul>
<li><a href="#">Menu Item</a></li>
<li><a href="#">Menu Item</a></li>
<li><a href="#">Menu Item</a></li>
<li><a href="#">Menu Item</a></li>
</ul>
</nav>
<p>Struggling to find a way to hide scrollbars without affecting sub-menus.</p>
CSS
nav {
position: relative;
zoom: 1;
border-top: 1px solid #ccc;
border-bottom: 3px solid #ccc;
float: left;
width: 100%;
/*overflow: hidden; */
}
ul {
clear: left;
float: left;
position: relative;
left: 50%;
text-align: center;
}
ul li {
float: left;
position: relative;
right: 50%;
}
ul a {
padding: 5px;
font-size: 11px;
display: block;
}
p {
text-align: center;
padding: 30px;
}
Looking for tips on how to center a variable-width UL menu at 100% width?