Compare these two JSFiddles:
Why does the first show my text aligned as I expect, yet the second displays the first link lower than the second?
Stack overflow wants me to include the code from them, so here is the first:
<ul>
<li>
<a class="link1">hello</a>
<span></span>
<a class="link2" href="www.google.com">there</a>
</li>
</ul>
.link1
{
display: inline-block;
}
.link2
{
display: inline-block;
}
The second only adds a single line,the overflow:
.link2
{
display: inline-block;
overflow: hidden;
}