繁体   English   中英

如何控制嵌套文本的溢出行间距<p>

[英]How to control overflow line spacing for text within nested <p><a>

如何最小化此按钮的以下溢出文本之间的间距,该间距只是一个

嵌套

DEMO

<style type="text/css">
  p.button:hover { cursor: pointer; }
  p.padding  { padding:0; margin:0;}
</style>
<div style="width: 370px">
<table class="inline_button" style="width: auto ">
    <tr>
        <td style="text-align: center;  min-height: 28px;background-color: #000000; line-height: 28px;font-size: 12px;font-family: Arial, Verdana, sans-serif;padding: 0;border: 2px solid #fe9d39;"><div id="whatever">
            <p class="button padding" style="text-decoration: none; color: #ffffff; font-weight: bold;"><a style="text-decoration: none; color: #ffffff; font-weight: bold; padding:0px 10px; display:block;" href="http:msn.comr}">when this is really long it eventually overruns but can figure out </a></p>
        </div></td>
    </tr>
</table>
</div>

请将<a><p> line-height属性设置为normal1或以px单位。

添加此代码

p.padding a{line-height:normal;}

要么

p.padding a{line-height:1;}

要么

p.padding a{line-height:12px;}

到您的样式表。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM