Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Change size of banner buttons on mobile

Solved

Change size of banner buttons on mobile

Hugobrunto
Excursionist
42 0 11

Hi Experts,

 

I'm facing an issue with our image banner buttons. Perfect on desktop view but on mobile they are too wide.. How to make them smaller only in mobile view? I'm using a purchased theme named IRIS. I've also tried several codes without any result. 

 

If someone could find a solution, i'd very happy ❤️

 

Skärmavbild 2024-11-09 kl. 13.18.12.pngSkärmavbild 2024-11-09 kl. 13.18.58.png

 

/Hugo Brunto

Accepted Solution (1)

DaisyVo
Shopify Partner
902 113 130

This is an accepted solution.

HI @Hugobrunto 

 

To complete your requests, please follow these steps:
  1. Go to Shopify Admin > Online Store > Theme > Customize > Theme Settings > Custom CSS https://prnt.sc/i8ljAMlHJUKl
  2. Paste the code provided into the Custom CSS section.

 

@media screen and (max-width: 768px){
.banner-buttons.banner-buttons--multiple > a {
    max-width: 200px !important;
    min-width: 200px !important;
}
.banner-buttons.banner-buttons--multiple {
    justify-content: center !important;
}
}​

 

 

Here is the result: https://prnt.sc/k20ovW2ZXATx 
 
I hope this helps
 
Best,
 
Daisy 
Please let us know if our reply is helpful by giving it a Like or marking it as a Solution!

Avada SEO & Image Optimizer - The #1 SEO solution

View solution in original post

Replies 10 (10)

mrashid
Shopify Partner
290 24 28

@Hugobrunto share store url

 

- Need a Shopify developer? Chat on WhatsApp +923068683199
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
Hugobrunto
Excursionist
42 0 11

Hi, 

 

of course! Here it is: www.hugobrunto.se 

 

thanks for checking 🙂  

mrashid
Shopify Partner
290 24 28

@Hugobrunto  paste in base.css

@media only screen and (max-width: 768px) {

a.button.button--secondary {
    min-width: 16rem !important;
}
}

 

- Need a Shopify developer? Chat on WhatsApp +923068683199
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
mrashid
Shopify Partner
290 24 28
- Need a Shopify developer? Chat on WhatsApp +923068683199
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
Hugobrunto
Excursionist
42 0 11

Hi Mrashid, 

 

I love this look! This is exactly what I would love to achieve. But unfortunately it doesn't work. I pasted it in the bottom of base.css 

 

Best regards,

Hugo Brunto 

 

mrashid
Shopify Partner
290 24 28

@Hugobrunto dont remove code let me check

- Need a Shopify developer? Chat on WhatsApp +923068683199
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
mrashid
Shopify Partner
290 24 28

@Hugobrunto  okay you need to paste this custom css. let me know

- Need a Shopify developer? Chat on WhatsApp +923068683199
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution

DaisyVo
Shopify Partner
902 113 130

This is an accepted solution.

HI @Hugobrunto 

 

To complete your requests, please follow these steps:
  1. Go to Shopify Admin > Online Store > Theme > Customize > Theme Settings > Custom CSS https://prnt.sc/i8ljAMlHJUKl
  2. Paste the code provided into the Custom CSS section.

 

@media screen and (max-width: 768px){
.banner-buttons.banner-buttons--multiple > a {
    max-width: 200px !important;
    min-width: 200px !important;
}
.banner-buttons.banner-buttons--multiple {
    justify-content: center !important;
}
}​

 

 

Here is the result: https://prnt.sc/k20ovW2ZXATx 
 
I hope this helps
 
Best,
 
Daisy 
Please let us know if our reply is helpful by giving it a Like or marking it as a Solution!

Avada SEO & Image Optimizer - The #1 SEO solution
Hugobrunto
Excursionist
42 0 11

Hi DaisyVo, 

 

Actually this code works fine. But is it possible to get them side by side, as Mrashid above shown in his example? 

 

Thanks again for taking your time, it means the world ❤️ 

 

/Hugo Brunto 

Hugobrunto
Excursionist
42 0 11

Hi again, this works perfectly! Thanks again! I found a solution thanks to this. I just increased the numbers in your code. ❤️