I already centered the product price, “Tax Inclucded” / “Quantity” text and the quantity selector by adding the following code to mybase.css :
.price.price--large.price--show-badge {
text-align: center;
}
.product__tax.caption.rte {
text-align: center;
}
.product-form__quantity-top .form__label {
text-align: center;
}
As I now added color variants for the products I am selling I realized only the price, quantity and quantity selector are centered but the “color” variant text and the variant buttons need to be centered also
How can I fix this?
Hello, Wrap them into a div and add: margin:0 auto; in inline style.
I hope that works
@Dingus369 ,
Please add this CSS at the bottom in your css file
.price.price--large.price--show-badge,
.product__tax.caption.rte,
.product-form__quantity-top .form__label {
text-align: center !important;
}
Thanks!
@infoatcodelab7
Unfortunately this did not change anything.
The variant text and button are still left-aligned while everything else is centered.
@Uzair-zolo
Could you please post a code?
@Dingus369 ,
Add this CSS
.price.price--large.price--show-badge,
.product__tax.caption.rte,
.product-form__quantity-top .form__label {
margin: auto;
display: block;
}
Thanks!
@infoatcodelab7
Sorry, it is still not working.
@Dingus369 ,
Please share your site URL, also can you please provide screenshot
I will check out the issue and provide you a solution here.
@Dingus369 ,
Please add this CSS at the bottom of your css file
.product-form__input input[type=radio]+label{
display: table !important;
margin:10px auto !important;
}
legend.form__label {
text-align: center;
}
Thnaks!
2 Likes
@infoatcodelab7
Thanks for help, the option buttons are now centered but not in the same line anymore but on top of each other instead.
Also the word “color” is still left alligned.
Can you help me to fix this?
@infoatcodelab7 :
I need to correct myself:
In smartphone mode everything looks fine now, but in desktop mode the word “Color” is still left alligned and the buttons are alligned, but not in the same line anymore but on top of each other instead.
So I need to code also the center “color” in desktop mode and have the buttons in one horizontal line in both modes.
Your help is appreciated.