Is there a way to control the position of the underline in text-decoration: underline?
<a href="#">Example link</a>
The example above has an underline by default...is there a way to nudge that underline down by a few pixels so that there is more space between the text and the underline?
The only way to do that is to use a border instead of an underline. Underlines are notoriously inflexible.
a {
border-bottom: 1px solid currentColor; /* Or whatever color you want */
text-decoration: none;
}
Here's a demo. If that's not enough space, you can easily add more — if it's too much, that's a little less convenient.