"Add to Cart" HTML table 中的按钮使行高加倍但位于单元格的上半部分?
"Add to Cart" button in HTML table doubles row height but sits in the top half of cell?
我正在编写一个包含单个长目录的新网站。
每个项目都在 HTML table 的单独行中,右侧单元格中有一个 "Add to Cart" Paypal 按钮。
我是 PayPal 新手,我选择使用小按钮尽可能少地影响行。但是,当我添加按钮时,行的高度增加了一倍,按钮位于单元格的上半部分。目前,您可以在 http://www.247caregivingproducts.com/catalog.htm.
看到它
如何在不改变行高超过按钮大小的情况下添加按钮?
表单本身会增加高度,所以如果您将表单的高度更改为按钮的高度就可以了。
td form {
height: 21px !important;
}
因为图片会占用额外的space。您可以 none 显示它,例如:
#catalog img {
display: none;
}
并使按钮垂直,您可以使用以下 css:
input {
position: relative;
top: 3px;
}
如果你不想要 display:none
图片,请参考 Flo 的回答。
希望对您有所帮助。
我正在编写一个包含单个长目录的新网站。 每个项目都在 HTML table 的单独行中,右侧单元格中有一个 "Add to Cart" Paypal 按钮。
我是 PayPal 新手,我选择使用小按钮尽可能少地影响行。但是,当我添加按钮时,行的高度增加了一倍,按钮位于单元格的上半部分。目前,您可以在 http://www.247caregivingproducts.com/catalog.htm.
看到它如何在不改变行高超过按钮大小的情况下添加按钮?
表单本身会增加高度,所以如果您将表单的高度更改为按钮的高度就可以了。
td form {
height: 21px !important;
}
因为图片会占用额外的space。您可以 none 显示它,例如:
#catalog img {
display: none;
}
并使按钮垂直,您可以使用以下 css:
input {
position: relative;
top: 3px;
}
如果你不想要 display:none
图片,请参考 Flo 的回答。
希望对您有所帮助。