How to Code the button to be centered on each image in image banner when images are split? Dawn

I want each button to be centered on each image not in the middle of both? Any Help?

Hi @stonecold

Can you share with me the store link to check further? Thank you

https://uxrhkg-hb.myshopify.com/

In mobile it looks off aswell. There are 2 buttons on one image.

Hi @stonecold , kindly provide your store URL please and if it is password protected, please share the password as well. Thanks

Hi @stonecold ,

  1. Go to Online Store → Theme → Edit code.
  2. Open your theme.css / based.css file and paste the code in the bottom of the file.
.banner__buttons {
    gap: 45rem !important;
    max-width: none !important; 
}

If my reply is helpful, kindly click like and mark it as an accepted solution.

If you are happy with my help, you can help me buy a COFFEE

Thanks!

Hi @stonecold

I just commented on a similar problem like this last night.

https://community.shopify.com/c/shopify-design/how-do-i-center-buttons-in-an-image-banner-for-desktop-and/td-p/2874527

Try the code to your store.

I try it.

  1. From your Shopify admin dashboard, click on “Online Store” and then “Themes”.
  2. Find the theme that you want to edit and click on “Actions” and then “Edit code”.
  3. In the “Assets” folder, click on “base.css, style.css or theme.css” file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:
.banner__box.content-container {
    max-width: 100%;
    width: 100%;
}

.banner__content.banner__content--middle-center {
     max-width: 100%;
}

.banner__buttons.banner__buttons--multiple {
    display: flex;
    justify-content: space-around;
    max-width: 100%;
    width: 100%;
}
.banner--content-align-center .banner__buttons--multiple>* {
    flex-grow: unset !important;
}

Your Feedback Matters! Please mark the solution and give likes to posts that helped you. Your appreciation fuels our motivation to assist you better!

Hello,

  1. Go to Online Store >> theme >> Customization >> Image banner.

Screenshot 2024-12-10 165027.png

Thanks!

Great, I got it working now. But on Mobile the button is formatted weirdly, is there a solution to this?

I think you are using another code not what I provide. Please, ask them.