Shopify themes, liquid, logos, and UX
Hi all,
I am having trouble with my image banner. It shows well in the desktop version but the mobile version has the left and right side portions cut-off. I am using the 3:2 aspect ration and the image size is 1080x720 pxl size.
Here is the link to my website www.femmiflare.com
I checked with support and unfortunately support tells me this is how it is for Dawn. I am having a hard time understanding how that could be since its so basic feature. So dissapointing 😞
I hope some expert in here has a solution. Thank you so much for taking the time!
Solved! Go to the solution
This is an accepted solution.
Hi, I fixed it. My mistake when missing i in position code. The code should be like this
@media screen and (max-width: 749px) {
.banner__media { height: auto !important; }
.banner__media img { object-fit: contain !important; position: relative !important; }
}
- Is it helpful? Like, or Accept my solution or Buy Me a Coffee!
- Ryviu - Product Reviews app, Collect consumer feedback and import reviews from AliExpress, Amazon, Etsy, Shoppe and Walmart.
- Enjoy 3 months of Shopify for $1/month. Sign up now
Adjust the image dimensions: Since the image is cut off on the left and right sides in the mobile version, you can try resizing the image to fit better within the mobile screen. You can experiment with different dimensions, such as reducing the width while maintaining the aspect ratio, to ensure the entire image is visible on mobile devices.
Use media queries: You can use CSS media queries to apply specific styles to the image banner based on the device's screen size. By targeting the mobile viewport, you can adjust the positioning or scaling of the image to make it fully visible. Here's an example of how you can use a media query to adjust the image size for mobile:
@media (max-width: 767px) { /* Adjust the max-width value to match your desired mobile breakpoint */
.image-banner {
width: 100%; /* Adjust the width as needed */
height: auto;
object-fit: contain; /* or object-fit: cover; depending on the desired effect */
}
}
Hi, I am not sure which file i need to add this to? I added this code to base.css and made width to 50% and played with different numbers but that has not changed anything and the mobile image is still showing with sides cut-off.
Am i doing something wrong or any other solution?
Thanks
Rama
Please add this CSS at the bottom of your base.css file
@media screen and (max-width: 749px) {
.banner__media { height: auto !important; }
.banner__media img { object-fit: contain !important; postion: relative !important; }
}
- Is it helpful? Like, or Accept my solution or Buy Me a Coffee!
- Ryviu - Product Reviews app, Collect consumer feedback and import reviews from AliExpress, Amazon, Etsy, Shoppe and Walmart.
- Enjoy 3 months of Shopify for $1/month. Sign up now
Hi Dan, I tried this solution by adding the script to the bottom of the base.css file.
But now the image banner has completely disappeared from the mobile view. I have attached a picture.
I have to mention i am using the Dawn theme 9.0.0 version. Does the script need to go in someother place?
Thank you!
Rama
Can I request access to your store so I can check and help you?
- Is it helpful? Like, or Accept my solution or Buy Me a Coffee!
- Ryviu - Product Reviews app, Collect consumer feedback and import reviews from AliExpress, Amazon, Etsy, Shoppe and Walmart.
- Enjoy 3 months of Shopify for $1/month. Sign up now
Yes, but I am not sure how to give access in a secure way. If you can share your email, i guess i can give you permission?? Sorry never done that before, so you have to help me with that.
I sent a request to access your store. Please accept it so I can help you
- Is it helpful? Like, or Accept my solution or Buy Me a Coffee!
- Ryviu - Product Reviews app, Collect consumer feedback and import reviews from AliExpress, Amazon, Etsy, Shoppe and Walmart.
- Enjoy 3 months of Shopify for $1/month. Sign up now
Hi Dan, Happy Friday!
Just did. I would really appreciate to know the changes that you make so i can keep track of my site.
Thank you!
Rama
This is an accepted solution.
Hi, I fixed it. My mistake when missing i in position code. The code should be like this
@media screen and (max-width: 749px) {
.banner__media { height: auto !important; }
.banner__media img { object-fit: contain !important; position: relative !important; }
}
- Is it helpful? Like, or Accept my solution or Buy Me a Coffee!
- Ryviu - Product Reviews app, Collect consumer feedback and import reviews from AliExpress, Amazon, Etsy, Shoppe and Walmart.
- Enjoy 3 months of Shopify for $1/month. Sign up now
Hi Dan, Thank you so so much!! Have a blessed weekend 🙏!!!
User | RANK |
---|---|
182 | |
150 | |
80 | |
72 | |
61 |
Explore the 30-30-30 rule, a dynamic social media strategy for new businesses. Learn how t...
By Trevor Sep 20, 2023Discover how to leverage the often overlooked footer of your ecommerce site to gain custom...
By Skye Sep 15, 2023In this blog, we’ll be shining a light on Shopify Partners, Experts, and Affiliates. Who a...
By Imogen Sep 13, 2023