I have an SVG element as an icon that appears after a link:
<a class="external-link" href="http://www.google.com">google.com
<svg class="external-link-svg">...</svg>
</a>
I want the underline to extend underneath the svg element. I have this working as seen from the image but the only way I've managed to do it is by inserting blank spaces in the CSS:
.external-link:after {
content: "\00a0\00a0\00a0\00a0";
}
This feels like a bit of a hack because if I change icons, say for a wider or narrower one, the underline would no longer be the correct length.
Is there a way to extend the underline without resorting to injecting blank spaces?
Many thanks