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 are inline-block
and if you refer to the specification:
Note that text decorations are not propagated to floating and absolutely positioned descendants, nor to the contents of atomic inline-level descendants such as inline blocks and inline tables.
a .glyphicon {
top: 0;
display: inline;
}
Saber mais
And to explain the small line you see between the two icons initially:
Underlines, overlines, and line-throughs are applied only to text (including white space, letter spacing, and word spacing): margins, borders, and padding are skipped
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:
a:hover {
text-decoration:none!important;
border-bottom:1px solid
}
.glyphicon {
font-size:20px;
}
Good one