Site logo

[Resolved] How to align buttons to right.?

Home Forums Support [Resolved] How to align buttons to right.?

Home Forums Support How to align buttons to right.?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2554440
    Jusung

    I am working on product page and I found this is super complicated..

    On this page, I want to align “add to cart” and “buy now” buttons to the right.

    Could you help with this?

    #2554568
    Leo
    Staff
    Customer Support

    Hi there,

    This CSS would work but it’s not the best solution as it might impact other elements:

    .woocommerce div.product form.cart {
        justify-content: flex-end;
    }

    Are you adding the buttons manually somehow? If so can you wrap a GB container outside?

    Let me know 🙂

    #2554808
    Jusung

    Add to cart button is added by the woocommerce plug-in.
    I added “buy now” button by adding php code.
    So, it is possible to wrap only “buy now” button by div with class.

    Can you give me an idea how I can make a button that can be wrapped by gb container?

    Your code is working well and it doesn’t affect other elements since I have “add to cart” button only on produdct page.

    Thank you!

    #2555618
    Leo
    Staff
    Customer Support

    Your code is working well and it doesn’t affect other elements since I have “add to cart” button only on produdct page.

    In that case, then I’d say the CSS should be fine.

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