maxp maxp - 6 months ago 15
CSS Question

How to increase the gap between text and underlining in CSS

Using CSS, when text has

text-decoration:underline
applied, is it possible to increase the distance between the text and the underline?

Answer

No, but you could go with something like border-bottom: 1px solid #000 and padding-bottom: 3px.

edit: if you want the same color of the "underline" (which in my example is a border), you just leave out the color declaration, i.e. border-bottom-width: 1px and border-bottom-style: solid.

Comments