{"id":3202,"date":"2016-09-22T18:50:12","date_gmt":"2016-09-22T16:50:12","guid":{"rendered":"https:\/\/en.florianbrinkmann.de\/?p=3202"},"modified":"2020-02-09T11:00:00","modified_gmt":"2020-02-09T10:00:00","slug":"position-underlining-closer-to-the-text-css","status":"publish","type":"post","link":"https:\/\/florianbrinkmann.com\/en\/position-underlining-closer-to-the-text-css-3202\/","title":{"rendered":"Position underlining closer to the text [CSS]"},"content":{"rendered":"

Perhaps you use border-bottom<\/code> instead of text-decoration: underline<\/code> to underline links or other text. But if this underline is too far from the text, you have a problem, because you cannot position a border closer to the text. Here I show you how you can resolve that.<\/p>\n\n\n\n\n\n\n\n

Problem: The \u00bbmarking height\u00ab of fonts<\/h2>\n\n\n\n

First here is a screenshot which shows the problem \u2013 the underline is implemented via border-bottom<\/code>:<\/p>\n\n\n\n