I am using icon fonts in a nav
list and I want text to be in between two of the icons. The problem is that the icons and the text do not match up well. The icons area obviously higher than the text so when they are both on the baseline, the icons go a lot higher. Is there any solution I can use by putting the text in a span
? I have tried adjust every parameter I know:
HTML:
<nav class="nav">
<ul>
<li><span data-icon=""></span><h2>HOME</h2></li>
<li><p>ICON FONT FTW</p></li>
<li><span data-icon=""></span><h2>ABOUT</h2></li>
<li><span data-icon=""></span><h2>CONTACT</h2></li>
</ul>
</nav>
CSS:
nav {
font-size: 1.2em;
background: gray;
text-align: center;
}
nav li:first-child {
display: inline-block;
}
nav li {
display: inline-block;
}