Woocommerce:将添加到购物车按钮与 CSS 对齐
Woocommerce: Align add to cart button with CSS
有没有办法对齐 shop page 上的“添加到购物车”按钮?当产品名称长度不同时。我尝试添加这个 CSS 代码,但没有悬停它就无法工作。
.woocommerce .products .product .button {
font-size: 13px;
/* padding:8px 26px; */
margin-left: 10px;
position: absolute !important;
display: block;
bottom: 30px;
vertical-align: bottom !important;
}
.woocommerce a.added_to_cart {
/* display: inline-block; */
font-size: 12px;
line-height: 18px;
padding-top: 8px;
position: absolute !important;
display: block;
bottom: 30px;
vertical-align: bottom !important;
white-space: nowrap;
border-bottom: 1px solid transparent;
}
如果产品名称足够长,请尝试打断产品名称,或者使用 'product name so long..... ' 这种方式显示产品 name.or 更好地覆盖子主题上的模板 archive.php。
有没有办法对齐 shop page 上的“添加到购物车”按钮?当产品名称长度不同时。我尝试添加这个 CSS 代码,但没有悬停它就无法工作。
.woocommerce .products .product .button {
font-size: 13px;
/* padding:8px 26px; */
margin-left: 10px;
position: absolute !important;
display: block;
bottom: 30px;
vertical-align: bottom !important;
}
.woocommerce a.added_to_cart {
/* display: inline-block; */
font-size: 12px;
line-height: 18px;
padding-top: 8px;
position: absolute !important;
display: block;
bottom: 30px;
vertical-align: bottom !important;
white-space: nowrap;
border-bottom: 1px solid transparent;
}
如果产品名称足够长,请尝试打断产品名称,或者使用 'product name so long..... ' 这种方式显示产品 name.or 更好地覆盖子主题上的模板 archive.php。