I am trying to build a fullscreen website and I am not sure how to make the list items centered vertically in my nav tag/object.
I would like to make it as responsive as possible, so I built it using percentages.
And here is a code snippet:
Html:
<div id="main">
</div>
<nav>
<ol>
<li><a href="home.php">Home</a></li>
<li><a href="Info.php">Info</a></li>
<li><a href="projects.php">Projects</a></li>
<li><a href="contact.php">Contact</a></li>
</ol>
</nav>
CSS:
nav {
width: 100%;
bottom: 0;
left:0;
height: 10%;
position: fixed;
background-color: #333;
}
ol {
margin: 0;
list-style: none;
text-align: center;
vertical-align: middle;
height: 100%;
}
li {
display: inline;
margin-right: 40px;
}
#main {
background-color: #C90;
width: 90%;
height: 80%;
margin: 5% auto;
}
Or is it easier to use an unordered list?
Sorry for my bad english!