I am having a problem vertically centering my navigation within the skeleton CSS framework, I have tried other suggestions from all over the Internet but to no avail.
I did manage to get it by adding a margin-top to the top of the ul but it was leaving a big white space underneath the navigation which was pushing page elements underneath it down.
<header class="mainNav">
<div class="container">
<div class="row">
<div class="four columns"><img class="logo" src="img/redonelogo.png"></div>
<nav>
<div class="six columns">
<ul>
<li><a href="#">about</a></li>
<li><a href="#">contact</a></li>
</ul>
</div>
</nav>
</div>
</div>
</header>
CSS:
.mainNav {
padding: 1%;
border-bottom: 1px solid #ccc;
text-align: center;
margin: 0;
padding: 0;
}
.mainNav ul {
list-style-type: none;
}
.mainNav ul li {
display: inline;
position: relative;
}
.mainNav ul li a {
display: inline-block;
}
I have tried adding margin:0 auto;
to the ul
item and the li
item but nothing changed.