简体   繁体   中英

Paragraph cuts bottom of image? (HTML/CSS)

I need a little help here. I created a larger button on my order page and the bottom gets cut off to close. I need to add a little space on the bottom. I added a 1px border so you can see how it's laid out. You can view the problem here: 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;
}

a is an inline object and will not accept a height . Use margin: 5px or put padding:5px in the p.cart-btns {}

You can also just float:left the a.add-to-cart {} to make it ignore the boundaries in a way (takes out of the normal flow of the document).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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