[英]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.
我添加了一个1px的边框,以便您可以看到它的布局。 You can view the problem here: https://www.evernote.com/shard/s329/sh/a408b2ff-472c-481a-8fb1-b9e48c1205e1/5ddd92e9d940c78a57487e07d6eedcd4
您可以在此处查看问题: 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! "Halloween Special" </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
. a
是一个嵌入式对象,将不接受height
。 Use margin: 5px
or put padding:5px
in the p.cart-btns {}
使用
margin: 5px
或在p.cart-btns {}
放置padding:5px
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). 您也可以只
float:left
a.add-to-cart {}
,使其以某种方式忽略边界(从文档的正常流程中删除)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.