段落削减了图像的底部? (HTML / CSS)

时间:2013-10-25 22:48:47

标签: html css image height

我需要一点帮助。我在订单页面上创建了一个更大的按钮,底部被切断关闭。我需要在底部添加一点空间。我添加了1px边框,这样你就可以看到它是如何布局的。您可以在此处查看问题:https://www.evernote.com/shard/s329/sh/a408b2ff-472c-481a-8fb1-b9e48c1205e1/5ddd92e9d940c78a57487e07d6eedcd4

<p><span id="old-price">$199 </span>
    <span id="new-price">$147</span>
    <strong><font color="#FF0000">
    35% off! &quot;Halloween Special&quot; </font></strong><em>Expires Nov 1st.</em>
<p class="cart-btns">
    <a href="https://www.e-junkie.com/ecom/gb.php?c=cart&i=CAP2S&cl=133613&ejc=2" target="ej_ejc" class="add-to-cart ec_ejc_thkbx" onclick="javascript:return EJEJC_lc(this);"></a>
</p>

    .products li p.cart-btns a.add-to-cart {
width: 120px;
height: 50px;
background: url(images/add-to-cart.gif) no-repeat;
}

1 个答案:

答案 0 :(得分:0)

a是内嵌对象,不接受height。使用margin: 5px或将padding:5px放入p.cart-btns {}

您也可以只float:left a.add-to-cart {}使其忽略某种方式的边界(取消文档的正常流程)。

相关问题