I have the following code to create a horizontal navigation bar however it’s not filling up the full width of the browser like I want it to. What is wrong with my code? There are no anchor tags because the html is created dynamically with javascript and it has a click event to go to the sections. This is for an assignment so it has to be done that way.
<header class="page__header">
<nav class="navbar__menu">
<!-- Navigation starts as empty UL that will be populated with JS -->
<ul id="navbar__list"></ul>
</nav>
</header>
#navbar__list {
list-style-type: none;
color: #FFF;
margin: 0 auto 0 auto;
padding: 0;
position: fixed;
top: 0;
width: 100%;
min-width: 100%;
overflow: auto;
}
#navbar__list li {
cursor: pointer;
background-color: #dddddd;
color: #000;
padding: 8px;
display:block;
width: 31%;
float:left;
border:1px solid #000;
text-align: center;
}