JSFiddle here - http://jsfiddle.net/2R36y/
Relevant span code -
nav ul li a span {
font: 30px"Dosis", sans-serif;
text-transform: uppercase;
position: relative;
left: 120px;
width: inherit;
height: inherit;
display: none;
text-align: left;
}
<nav>
<ul>
<li> <a href="#">
<span>Home</span>
</a>
</li>
<li> <a href="#">
<span>About</span>
</a>
</li>
<li> <a href="#">
<span>Portfolio</span>
</a>
</li>
<li> <a href="#">
<span>Contact</span>
</a>
</li>
</ul>
</nav>
One way is by using display: table-cell;
and vertical-align: middle;
- you can also use line-height
since the <span>
has a fixed height.
nav ul li a:hover span {
font: 30px"Dosis", sans-serif;
text-transform: uppercase;
position: relative;
left: 120px;
width: inherit;
height: inherit;
display: table-cell;
vertical-align: middle;
text-align: left;
}
http://jsfiddle.net/2R36y/1/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With