How can I effectively resize 'shop all' buttons on mobile?

Solved

How can I effectively resize 'shop all' buttons on mobile?

Jiozx
Pathfinder
136 4 56

Hi,

I have been trying to resize the "shop all" buttons on mobile but it's not working very well... how do I fix this?

Jiozx_0-1665770876850.png

8B671FD7-5709-4D95-98C3-147B20E14FC4.png

This is not 2px...

Webshop: https://axiomunit.store

Omar Al-Ali
Founder of Clothing Brand Axiom Unit
Webshop: https://axiomunit.store
Accepted Solution (1)

hcugur
Shopify Partner
4 1 0

This is an accepted solution.

Hello, when I looked at your shop I find out that there are two places giving your elements min-width attributes. You need to override or remove them to give your elements 2px width.

Screen Shot 2022-10-14 at 22.48.15.pngScreen Shot 2022-10-14 at 22.48.45.png 

Also your buttons are redirecting wrong pages, when I clicked to "Shop Women" it redirected me to Men's page and vice-versa. You may want to fix that too.

View solution in original post

Replies 9 (9)

hcugur
Shopify Partner
4 1 0

This is an accepted solution.

Hello, when I looked at your shop I find out that there are two places giving your elements min-width attributes. You need to override or remove them to give your elements 2px width.

Screen Shot 2022-10-14 at 22.48.15.pngScreen Shot 2022-10-14 at 22.48.45.png 

Also your buttons are redirecting wrong pages, when I clicked to "Shop Women" it redirected me to Men's page and vice-versa. You may want to fix that too.

Jiozx
Pathfinder
136 4 56

I will check out the code.

Omar Al-Ali
Founder of Clothing Brand Axiom Unit
Webshop: https://axiomunit.store
Jiozx
Pathfinder
136 4 56

Actually... my current clothes are unisex so they're in both men's and women's section

Omar Al-Ali
Founder of Clothing Brand Axiom Unit
Webshop: https://axiomunit.store
hcugur
Shopify Partner
4 1 0

The products in redirected pages are identical then, if you are not planning to add other than unisex products redirecting with one "Show All" button might be a better option for UX. 

Jiozx
Pathfinder
136 4 56

I'm planning to add other products. I found the codes and removed one of the min-width and min-height, but I still can't resize the buttons properly. I found out, when you center buttons, they cannot lose their original min-width. Do you know how I can fix this?

Omar Al-Ali
Founder of Clothing Brand Axiom Unit
Webshop: https://axiomunit.store
hcugur
Shopify Partner
4 1 0

Is this appropriate for you? If not, could you be more specific about how you want them to be looking

Screen Shot 2022-10-14 at 23.59.42.png

Jiozx
Pathfinder
136 4 56

You have just aligned them to the left. I said when you center align them, you cannot make them smaller than their original min-width.

Omar Al-Ali
Founder of Clothing Brand Axiom Unit
Webshop: https://axiomunit.store
hcugur
Shopify Partner
4 1 0

If you want to make buttons smaller you can remove padding from following element

Screen Shot 2022-10-15 at 12.03.06.png

 

to align buttons center you can add 

 

display: flex;

flex-direction: column;
align-items: flex-start;
 
to the .banner__box element and 
 
margin-left: auto;
margin-right: auto;
 
to the .banner__buttons element
Jiozx
Pathfinder
136 4 56

Why would I add more CSS to other sections when I have two CSS sections for the buttons? Anyway I fixed it by myself last night

Omar Al-Ali
Founder of Clothing Brand Axiom Unit
Webshop: https://axiomunit.store