How can I center the 'out of stock' label on product pages?

Solved

How can I center the 'out of stock' label on product pages?

Marco211
Explorer
91 0 20

Good morning, do you happen to know how to center the "out of stock" label, in order to put everything centered for the products? Thanks a lot to everyone

 

https://refade-8966.myshopify.com/

password: refade

Accepted Solutions (2)
Moeed
Shopify Partner
4370 1127 1383

This is an accepted solution.

Hey @Marco211 

 

Follow these Steps:

1) Go to Online Store
2) Edit Code
3) Find theme.liquid file

4) Add the following code in the bottom of the file above </body> tag

<style>
.card__badge {
    width: 100% !important;
    text-align: center !important;
}
</style>

RESULT:

Moeed_0-1699615269127.png

 

If I managed to help you then, don't forget to Like it and Mark it as Solution!

 

Best Regards,
Moeed

Need a Shopify Specialist? Chat on WhatsApp


- Custom Design | Advanced Coding | Store Modifications
- Your Coffee Tip and my code, A perfect blend. ❤️

View solution in original post

Dan-From-Ryviu
Shopify Partner
8548 1686 1693

This is an accepted solution.

Add this code at the bottom of your base.css file. 

.card__content .card__badge {
justify-self: center !important;
}

Screenshot_1.jpg

- Helpful? Like and Accept solution to let me know or Buy me Coffee ❤️!
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Enjoy 1 month of Shopify for $1. Sign up now.

View solution in original post

Replies 4 (4)

Dan-From-Ryviu
Shopify Partner
8548 1686 1693

Hi @Marco211 

Do you mean center this badge? Screenshot_5.jpg

- Helpful? Like and Accept solution to let me know or Buy me Coffee ❤️!
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Enjoy 1 month of Shopify for $1. Sign up now.

Marco211
Explorer
91 0 20

Yes exactly

Moeed
Shopify Partner
4370 1127 1383

This is an accepted solution.

Hey @Marco211 

 

Follow these Steps:

1) Go to Online Store
2) Edit Code
3) Find theme.liquid file

4) Add the following code in the bottom of the file above </body> tag

<style>
.card__badge {
    width: 100% !important;
    text-align: center !important;
}
</style>

RESULT:

Moeed_0-1699615269127.png

 

If I managed to help you then, don't forget to Like it and Mark it as Solution!

 

Best Regards,
Moeed

Need a Shopify Specialist? Chat on WhatsApp


- Custom Design | Advanced Coding | Store Modifications
- Your Coffee Tip and my code, A perfect blend. ❤️
Dan-From-Ryviu
Shopify Partner
8548 1686 1693

This is an accepted solution.

Add this code at the bottom of your base.css file. 

.card__content .card__badge {
justify-self: center !important;
}

Screenshot_1.jpg

- Helpful? Like and Accept solution to let me know or Buy me Coffee ❤️!
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Enjoy 1 month of Shopify for $1. Sign up now.