锚标记上的边框底部填充

Coo*_* Yo 7 css header border padding

我在标题中有一个锚标记,我试图在锚标记上放置一个边框底部,这有效,但是底部的填充太大而负填充不起作用,我该如何解决这个问题呢?

直播现场

HTML

<div id="featureText">
        <h1>Recent Works / <a href="#">All</a></h1>
    </div>
Run Code Online (Sandbox Code Playgroud)

CSS

#featureText a {
    color: #414042;
    text-decoration: none;
    border-bottom: solid 2px #414042;
    padding-bottom: -2px; }
Run Code Online (Sandbox Code Playgroud)

Luc*_*ofi 8

#featureText a {
    line-height: 1em;
    display: inline-block;
    color: #414042;
    text-decoration: none;
    border-bottom: solid 2px #414042;
    padding: 0;
}
Run Code Online (Sandbox Code Playgroud)


Dav*_*mas 5

我建议:

#featureText h1 a {
    /* all your other CSS... */
    display: inline-block;
    line-height: 1em;
}
Run Code Online (Sandbox Code Playgroud)