Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/34.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 锚定标记上的边框底部填充_Css_Header_Border_Padding - Fatal编程技术网

Css 锚定标记上的边框底部填充

Css 锚定标记上的边框底部填充,css,header,border,padding,Css,Header,Border,Padding,我在标题中有一个锚定标签,我试图在锚定标签上放置一个边框底部,这是可行的,但是底部的填充太大,负填充不起作用,我如何解决这个问题 生活 html <div id="featureText"> <h1>Recent Works / <a href="#">All</a></h1> </div> 我建议: #featureText h1 a { /* all your other CSS...

我在标题中有一个锚定标签,我试图在锚定标签上放置一个边框底部,这是可行的,但是底部的填充太大,负填充不起作用,我如何解决这个问题

生活

html

<div id="featureText">
        <h1>Recent Works / <a href="#">All</a></h1>
    </div>
我建议:

#featureText h1 a {
    /* all your other CSS... */
    display: inline-block;
    line-height: 1em;
}
#featureText a {
    line-height: 1em;
    display: inline-block;
    color: #414042;
    text-decoration: none;
    border-bottom: solid 2px #414042;
    padding: 0;
}
#featureText h1 a {
    /* all your other CSS... */
    display: inline-block;
    line-height: 1em;
}