Hi, I have another question: how can I make the spacing between the icons in the navigation menu on my phone smaller?
link to site: https://ddbfr9-vj.myshopify.com/ password taycle
A user seeks to reduce spacing between navigation menu icons on mobile devices for their Shopify store.
Problem: Icons in the mobile header have excessive padding/spacing between them.
Solutions Provided:
Three developers offered CSS-based solutions with similar approaches:
base.css file targeting icons with width: 3.4rem using a max-width media query of 767pxAll solutions use media queries to apply changes only on mobile viewports and reduce icon dimensions to decrease spacing. Visual examples demonstrate the before/after effect. The issue remains open pending the original poster’s confirmation of which solution worked.
Hi, I have another question: how can I make the spacing between the icons in the navigation menu on my phone smaller?
link to site: https://ddbfr9-vj.myshopify.com/ password taycle
In order to reduce the padding between the icons of the header from the Mobile only you need to follow these steps.
Go to Shopify Admin >> Go to Online Store >> edit Code >> base.css
In the end of base.css file you need to paste the following code.
@media only screen and (max-width: 767px) {
.header__icon, .header__icon--cart .icon {
width: 3.4rem !important;
}
}
results:
Hi there,
You can use this code to reduce the space between the icons:
@media(max-width: 640px){
.header__icon{
height: 3.4rem;
width: 3.4rem;
}
}
Sinh developer, from Tipo