Reputation: 433
I'm creating a website with WordPress and wanted to center the elments on this page: https://www.web-demo-site.eu/trgovina/trepalnice-004-c/
I've tried things like:
But nothing seems to work. Currently I have:
#content div.product.type-product{
margin-left: 20%;
}
Which works, but not correctly since it's not aligned well on all devices. Is there a way to align the content on the Product Page from Woocommerce ?
Upvotes: 0
Views: 1572
Reputation: 2387
One way to archive this is:
margin-left
from #content div.product.type-product
.display: flex
and justify-content: center
to
.single-product .woocommerce-container
.Another way is removing the float
, and adding a margin: 0 auto
to .single-product .woocommerce-container #content
Solution 1:
.single-product .woocommerce-container {
display: flex;
justify-content: center;
}
Solution 2:
.single-product .woocommerce-container #content {
float: none;
margin: 0 auto;
}
You can add the CSS to the Customizer, or your child theme's CSS.
Upvotes: 1