Shopify themes, liquid, logos, and UX
The collection banner on desktop is perfect but when the same banner is cropped when viewed on mobile. can someone help me here?
Solved! Go to the solution
This is an accepted solution.
@shwetart
- please add following code at the bottom of the file theme.scss.liquid.
File Path: online store > themes > live theme > action > edit code > assets > theme.scss.liquid
@media only screen and (max-width: 600px) {
.collection__image-wrapper--small {
height: 96px !important;
}
.collection__image{
background-size: contain !important;
background-position: center !important;
background-repeat: no-repeat !important;
}
}
This is an accepted solution.
Please add the following code at the bottom of your assets/theme.scss.liquid file.
@media screen and (max-width: 640px) {
.collection__image-wrapper--small {height: 82px !important;}
.collection__image {
height: 100%;
background-size: contain;
background-position: center;
background-repeat: no-repeat;
}
}
Hope this helps.
Thanks!
Please share your website URL and password if any. I will check and provide a solution here.
Thanks!
yes, please provide the web url here @shwetart
This is an accepted solution.
@shwetart
- please add following code at the bottom of the file theme.scss.liquid.
File Path: online store > themes > live theme > action > edit code > assets > theme.scss.liquid
@media only screen and (max-width: 600px) {
.collection__image-wrapper--small {
height: 96px !important;
}
.collection__image{
background-size: contain !important;
background-position: center !important;
background-repeat: no-repeat !important;
}
}
Thank you so much .. it fit exactly
Thank you for the solution , but I have another problem here. The size though now fits well for mobile view, I had not realised that on desktop the view is also cropped:(.
The size of the category banner is 2000*450
please check this on desktop - https://www.mystiqliving.com/collections/specials
Please add the following code at the bottom of your assets/theme.scss.liquid file.
@media screen and (min-width: 641px) {
.collection__image-wrapper--small {height: 320px !important;}
}
Hope this works.
Thanks!
I amended the code but now the sides are cropped.. the height is fine but not the width
can you share screenshot please?
Please add the following code at the bottom of your assets/theme.scss.liquid file
@media screen and (min-width: 641px) {
.collection__image {
height: 100%;
background-size: contain;
background-position: center;
width: 100%;
background-repeat: no-repeat;
}
}
Hope this works.
Thanks!
also add this CSS without @media
.collection__image {
height: 100% !important;
background-size: contain !important;
background-position: center !important;
width: 100% !important;
background-repeat: no-repeat !important;
}
Hope this works.
Thanks!
This is an accepted solution.
Please add the following code at the bottom of your assets/theme.scss.liquid file.
@media screen and (max-width: 640px) {
.collection__image-wrapper--small {height: 82px !important;}
.collection__image {
height: 100%;
background-size: contain;
background-position: center;
background-repeat: no-repeat;
}
}
Hope this helps.
Thanks!
Thank you so much ...
If helpful then please Like and Accept Solution.
Can you help me to get perfect banner size for my site innofur.com
User | RANK |
---|---|
75 | |
63 | |
62 | |
48 | |
45 |
We're excited to announce improvements to the threaded messaging experience in our communi...
By TyW May 31, 2023Thank you to everyone who participated in our AMA with Klaviyo. It was great to see so man...
By Jacqui May 30, 2023Photo by Marco Verch Sales channels on Shopify are various platforms where you can sell...
By Ollie May 25, 2023