I am trying to underline with one line the <a>
and the <span>
I want it all to be a link with an underline. It leaves a small space between the word and the span, but it shouldn't.
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" >
<a href="#" role="button">
Saber mais
<span class="glyphicon glyphicon-menu-right size"></span>
<span class="glyphicon glyphicon-menu-right size segundoGlyph "></span>
</a>
Edit 1: And when the text size is higher than the glyphicon? the icon has a thin line and the text a heavy line!
You may add it on hover, but you need to pay attention as there is
top:1px
set to the icons by default so you need to remove it to have a full continuous line:Another solution is to make them
inline
as by default they areinline-block
and if you refer to the specification:And to explain the small line you see between the two icons initially:
So if you remove any white space you will see the line under the text only:
UPDATE
As pointed in the comment, different font-size between the text and the icon will make the underline different, so we may rely on border in this case: