Archived topic
Out of sotck
1 reply · Started by Jose on March 24, 2021
Hi, I wanto to display a text with "out of stock" in my web.
I have copy the next code for other forum thread, but it isn't working:
.woocommerce ul.products li.product.outofstock .inside-wc-product-image:before {
content: 'Out of Stock';
position: absolute;
z-index: 100;
display: flex;
justify-content: center;
align-items: center;
height: 50px;
left: 0;
right: 0;
top: 50%;
transform: translateY(-50%);
text-align: center;
background-color: rgba(255, 255, 255, 0.9);
color: #000;
z-index: 1;
}
It is the link of my shop
https://corteastur.es/tienda/
Hi there,
try this:
.woocommerce ul.products li.product:not(.instock) .wc-product-image:before {
content: 'Out of Stock';
position: absolute;
z-index: 100;
display: flex;
justify-content: center;
align-items: center;
height: 50px;
left: 0;
right: 0;
top: 50%;
transform: translateY(-50%);
text-align: center;
background-color: rgba(255, 255, 255, 0.9);
color: #000;
z-index: 1;
}