[Resolved] Centering Add To Cart Button On Mobile Website

Home Forums Support Centering Add To Cart Button On Mobile Website

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1508842
    Anthany

    Hi Generatepress team, I was wondering if you could help me center the add to cart button on the mobile version of my website (www.scuffed.ca).

    Thanks, Anthany

    #1508985
    David
    Staff
    Customer Support

    Hi there,

    try adding this CSS:

    .wp-block-button.aligncenter {
        text-align: center;
    }
    #1510189
    Anthany

    Hi David, unfortunately it did not work, on the single product page on my mobile site the add to cart button is still left aligned, any other ideas?

    Thanks, Anthany

    #1510288
    Elvin
    Staff
    Customer Support

    Hi,

    To clarify: do you mean you want your add to cart button to appear like this?
    https://share.getcloudapp.com/Z4uypBDN

    If so, you can try adding this css code:

    body.single-product form.cart {
        justify-content: center;
    }

    Note: make sure to purge Siteground’s cache if this doesn’t apply to the live site.

    A wise man once said:
    "Have you cleared your cache?"

    #1510318
    Anthany

    Yes I purged my cache prior, thank you very much Elvin that solution is exactly what I was looking for.

    #1510319
    Elvin
    Staff
    Customer Support

    Nice one. No problem. Glad to be of any help. 🙂

    A wise man once said:
    "Have you cleared your cache?"

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.