New to coding as of a week or so ago, and cannot understand, despite a lot of tinkering, why it will not work. Code is really untidy but a work in progress.
Just as the title states, I would have hoped this would have evenly spaced the 5 li elements across the 100% parent.
NOTE: The 19% width for #other was the only way I had been able to properly align them. Sorry if it confuses you.
* {
margin: 0px 0px;
padding: 0px 0px;
box-sizing: border-box;
}
.navBar li {
list-style-type: none;
display: inline-block;
font-family: Helvetica;
font-size: 1.7em;
line-height: 2;
font-family: 'Anton', sans-serif;
}
.navBar {
background: #92aad1;
position: fixed;
width: 100%;
}
.navBar li {
position: relative;
width: 20%;
text-align: center;
}
.navBar #Other {
width: 19%;
}
.navBar li:hover {
background: lightgrey;
}
<div class="navBar">
<ul list-style: none;>
<li id="Home">Home</li>
<li id="About">About</li>
<li id="Links">Links</li>
<li id="Work">Work</li>
<li id="Other">Other</li>
</ul>
</div>