skip to Main Content

How do i center the add to cart button:

Here is the section:

enter image description here

You can find the page here:

https://silverblaar.tmmbuilds.com/product/full-spectrum-cbd-health-oil/

I have tried the following code but it’s not working:

.woocommerce div.product form.cart { 
  float:none !important; 
}

Thanks!

2

Answers


  1. you can simply center quantity selector and button by adding these CSS

    form.cart {
    display: flex;
    justify-content: center;
    align-items: baseline;
    }
    

    center

    regards

    Login or Signup to reply.
  2. Target the form and use the text-align to center it!

    .woocommerce div.product form.cart{
      text-align: center;
    }
    

    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search