Shopify themes, liquid, logos, and UX
Hello,
I am quite happy with the desktop version of the shop, but I am struggling to make my it look alright on mobile. I am using the Dawn theme.
https://canis-infernalis.myshopify.com/
https://canis-infernalis.myshopify.com/collections/all
The banner in the home page gets cropped and loses image quality in the mobile version.
In the catalog and collection pages, the product pictures turn really small on mobile, and the text and prices look unreadable.
Would appreciate any help with this! Thanks in advance
Solved! Go to the solution
This is an accepted solution.
There are 2 issues that need to be addressed, namely:
the base.css file in the assets folder (object-fit: cover).
Note that the value "cover" in the object-fit attribute means that the image keeps its aspect ratio and fills the given dimension, but may be clipped to fit. This is what causes the image to be too large and lose quality on mobile devices.
My suggestion for this issue on mobile screens is as follows:
1. Go to Themes -> Edit Code
2. Find the base.css file and add the following CSS at the end:
@media screen and(max-width: 670px){
#Banner-template--14705701552266__image_banner {
height: 21rem !important;
}
#Banner-template--14705701552266__image_banner .banner__buttons {
position: relative;
top: -20px;
}
#Banner-template--14705701552266__image_banner .button {
font-size: 1rem !important;
min-width: calc(10rem + var(--buttons-border-width) * 2) !important;
min-height: calc(2.5rem + var(--buttons-border-width) * 2) !important;
}
}
@media screen and(max-width: 540px){
#Banner-template--14705701552266__image_banner {
height: 18rem !important;
}
#Banner-template--14705701552266__image_banner .banner__buttons {
position: relative;
top: -42px;
}
#Banner-template--14705701552266__image_banner .button {
font-size: 1rem !important;
min-width: calc(10rem + var(--buttons-border-width) * 2) !important;
min-height: calc(2.5rem + var(--buttons-border-width) * 2) !important;
}
}
Regarding the issue of image quality degradation when scaling, I can tell you that it is a common occurrence when images are resized, even though the object-fit attribute can minimize it. However, you can do better by:
I found the CSS code that causes this issue.
So, if possible, please go to base.css and remove that code. After that, your collection page will change its layout to 3 or 2 columns on smaller screens.
If our suggestions are useful, please let us know by giving it a like, marking it as a solution, or donating here ☕.
B2B Solution & Custom Pricing | Product Labels by BSS
Need help from our expert? Kindly share your request with us via community@bsscommerce.com
Thanks, any idea what code should be written? I unfortunately don't know much about this!
This is an accepted solution.
There are 2 issues that need to be addressed, namely:
the base.css file in the assets folder (object-fit: cover).
Note that the value "cover" in the object-fit attribute means that the image keeps its aspect ratio and fills the given dimension, but may be clipped to fit. This is what causes the image to be too large and lose quality on mobile devices.
My suggestion for this issue on mobile screens is as follows:
1. Go to Themes -> Edit Code
2. Find the base.css file and add the following CSS at the end:
@media screen and(max-width: 670px){
#Banner-template--14705701552266__image_banner {
height: 21rem !important;
}
#Banner-template--14705701552266__image_banner .banner__buttons {
position: relative;
top: -20px;
}
#Banner-template--14705701552266__image_banner .button {
font-size: 1rem !important;
min-width: calc(10rem + var(--buttons-border-width) * 2) !important;
min-height: calc(2.5rem + var(--buttons-border-width) * 2) !important;
}
}
@media screen and(max-width: 540px){
#Banner-template--14705701552266__image_banner {
height: 18rem !important;
}
#Banner-template--14705701552266__image_banner .banner__buttons {
position: relative;
top: -42px;
}
#Banner-template--14705701552266__image_banner .button {
font-size: 1rem !important;
min-width: calc(10rem + var(--buttons-border-width) * 2) !important;
min-height: calc(2.5rem + var(--buttons-border-width) * 2) !important;
}
}
Regarding the issue of image quality degradation when scaling, I can tell you that it is a common occurrence when images are resized, even though the object-fit attribute can minimize it. However, you can do better by:
I found the CSS code that causes this issue.
So, if possible, please go to base.css and remove that code. After that, your collection page will change its layout to 3 or 2 columns on smaller screens.
If our suggestions are useful, please let us know by giving it a like, marking it as a solution, or donating here ☕.
B2B Solution & Custom Pricing | Product Labels by BSS
Need help from our expert? Kindly share your request with us via community@bsscommerce.com
Amazing, thank you so so much!! That fixed the issue with the smaller images and unreadable text in the mobile version.
Regarding the banner:
How can I upload a separate image for the mobile version? I only see the option to upload 1 picture.
hi, i copied the code and pasted at the bottom of base.css file and saved it, refreshed my website and opened it on my mobile, nothing changed. the problem still remained. may i know if there is any other way to downsize the banner image t make it mobile responsive?
At Image banner in customize theme, I see it has 2 image upload items, and I tried
Then our store interface looks like this
Assuming image #1 is the desktop banner and #2 is the mobile banner image, on each device, only one image will be displayed.
Let's add some css in theme.css
On my desktop and mobile screens
Hope this helps you.
---------
BSS Commerce - Shopify Apps & Development Services Provider
Level up your Shopify store with our B2B & B2C apps
If our suggestions are useful, please let us know by giving it a like, marking it as a solution, or donating here ☕.
B2B Solution & Custom Pricing | Product Labels by BSS
Need help from our expert? Kindly share your request with us via community@bsscommerce.com
At the Image banner in customize the theme, we see it has 2 image upload items, and we tried
Then our store interface looks like this
Assuming image #1 is the desktop banner and #2 is the mobile banner image, on each device, only one image will be displayed.
Let's add some css in theme.css
On our desktop and mobile screens
Hope this helps you.
---------
BSS Commerce - Shopify Apps & Development Services Provider
Level up your Shopify store with our B2B & B2C apps
If our suggestions are useful, please let us know by giving it a like, marking it as a solution, or donating here ☕.
B2B Solution & Custom Pricing | Product Labels by BSS
Need help from our expert? Kindly share your request with us via community@bsscommerce.com
Hi @BSS-Commerce we're also having this problem where the banner is cropped on mobile view.
I cannot seem to find the code to be added here to be able to upload a separate mobile banner. Can you assist? And do you know the acceptable size for mobile banner image? Thank you so much!
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024