Home Forums WoodMart support forum Amend the width of the buy now and add to cart buttons on mobile and tablet

Amend the width of the buy now and add to cart buttons on mobile and tablet

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

    hey3212
    Participant

    Hi,

    The codes below are only effective on desktop to control the width of the buy now and add to cart buttons. How to make them apply to mobile and tablet?

    .single-product .single_add_to_cart_button,
    .single-product .wd-buy-now-btn {
    height: 45px; /* adjust this value as needed */
    font-size: 13px;
    }

    Attachments:
    You must be logged in to view attached files.
    #658185

    Hello,

    This code is working on both devices. Try to change the value and see the effect.

    To ensure the Buy Now and Add to Cart buttons have the same width across all devices (desktop, tablet, and mobile), please try the following CSS in the Global CSS Area.

    .single-product .single_add_to_cart_button,
    .single-product .wd-buy-now-btn {
      width: 100% !important; /* Adjust this as needed, e.g., 250px */
      max-width: 250px;        /* Optional: restricts maximum width */
      height: 45px !important;
      font-size: 13px !important;
    }

    Best Regards,

    #658194

    hey3212
    Participant

    Thank you very much. I have saved your codes.

    #658271

    Hello,

    You’re very welcome! I’m glad I could help. If you need anything else, feel free to reach out!

    Thanks for contacting us.
    Have a great day.

    Topic Closed.
    Best Regards,

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Amend the width of the buy now and add to cart buttons on mobile and tablet’ is closed to new replies.