I need these navigation links: "about" "resume" "projects" and "contact" to line up in the navigation bar. Anybody know why it is doing this with the display: inline-block?
It is my understanding that inline-block boxes should allow these elements to be side by side. I need it to be inline-block instead of just inline because I need to be able to size it to the nav bar's exact height. Any help is much appreciated, thanks!
Here is my html & css for my nav:
/* ----------------------------NAVIGATION SECTION-------------------------------- */
.headerContainer {
background-color: #000;
text-align: center;
height:60px;
margin-left: 600px;
margin-right: 600px;
font-family: 'Monda', sans-serif;
text-transform: uppercase;
position: fixed;
}
nav {
padding-left: 1000px;
padding-right: 1000px;
}
nav li {
list-style: none;
display: inline-block;
background-color: #000;
height: 40px;
padding-top: 20px;
width: 120px;
}
nav li:hover {
background-color: #e1e1e1;
-webkit-text-stroke: 2px #000;
}
a:link {
color: #fff;
text-decoration: none;
margin-left:25px;
margin-right:25px;
}
a:visited {
color: #fff;
}
a:focus {
color: #fff;
}
a:hover {
}
a:active {
color: #fff;
}
<!------------------------------NAVIGATION SECTION---------------------------------->
<header class="headerContainer">
<nav>
<ul>
<!-- you put the end tag ">" at the beginning of next line to get rid of whitespace between the links -->
<li><a href="#">About</a></li
><li><a href="#">Resume</a></li
><li><a href="#">Projects</a></li
><li><a href="#">Contact</a></li>
</ul>
</nav>
</header>
