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; }
}
- Helpful? Like or Accept solution! - Buy me a coffee
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Easy and fast to create Photo Gallery, Lookbook, Shop The Look
- Enjoy 1 month of Shopify for $1. 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; }
}
- Helpful? Like or Accept solution! - Buy me a coffee
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Easy and fast to create Photo Gallery, Lookbook, Shop The Look
- Enjoy 1 month of Shopify for $1. 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?
- Helpful? Like or Accept solution! - Buy me a coffee
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Easy and fast to create Photo Gallery, Lookbook, Shop The Look
- Enjoy 1 month of Shopify for $1. 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
- Helpful? Like or Accept solution! - Buy me a coffee
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Easy and fast to create Photo Gallery, Lookbook, Shop The Look
- Enjoy 1 month of Shopify for $1. 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; }
}
- Helpful? Like or Accept solution! - Buy me a coffee
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Easy and fast to create Photo Gallery, Lookbook, Shop The Look
- Enjoy 1 month of Shopify for $1. Sign up now
Hi Dan, Thank you so so much!! Have a blessed weekend 🙏!!!
Are you ready to take your business to the next level? Look no further than the latest ...
By SarahF_Shopify Apr 15, 2024We’re keeping the ball rolling to make sure you’re always ahead of the game. So buckle ...
By JasonH Apr 8, 2024Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024