Hey all,
is there any CSS code I can implement to make my product image on mobile stretch up to the header and remove any blank space surrounding it (like the images below)
Any help would be unreal.
My URL: https://project-thirteen.com.au
A Shopify store owner seeks CSS code to make product images on mobile extend fully to the header, eliminating surrounding blank space. They provide their store URL and reference images showing the desired layout.
Solution Provided:
A helper provides custom CSS to be added to assets/section-main-product.css, which:
Follow-up Adjustments:
Outcome:
The issue is successfully resolved through iterative CSS adjustments. The original poster confirms satisfaction with the final result, which includes full-width product images, repositioned zoom controls, and proper header/menu alignment on mobile devices.
Hey all,
is there any CSS code I can implement to make my product image on mobile stretch up to the header and remove any blank space surrounding it (like the images below)
Any help would be unreal.
My URL: https://project-thirteen.com.au
Yes, exactly like that.
Thanks for getting back to me, what code did I need to put in @DitalTek ?
Thank you have been patient!
You can add this code to assets/section-main-product.css file:
How to find to that file? you can go to Admin → Online Store → Themes → Customize Code → Assets:
@media screen and (max-width: 749px){
.section-header.shopify-section-group-header-group {
z-index: 3;
position: absolute;
top: 55px;
width: 100%;
}
.section-header.shopify-section-group-header-group .gradient {
background-color: transparent;
}
}
If you have further question, feel free to ask me!
Thanks @DitalTek , this worked although is it possible to move the magnifying glass to the bottom left hand side or make it invisible yet allow zoom when users click on the image?
Thanks
To do that you can move the zoom icon to right bottom with this code:
@media screen and (max-width: 749px){
.section-header.shopify-section-group-header-group {
top: 55px;
}
.media-type-image .product__media-icon {
top: auto;
left: auto;
right: 3.2rem;
bottom: 2.2rem;
}
}
This is result:
Thankyou @DitalTek , there now seems to be a slight gap between the announcement bar and the menu, is this fixable?
Yes, you can try this code:
@media screen and (max-width: 749px){
.section-header.shopify-section-group-header-group.menu-open {
z-index: 99;
}
.section-header.shopify-section-group-header-group.menu-open #menu-drawer {
top: -55px !important;
}
}
This is result:
Thankyou very much for your help @DitalTek
You are welcome ![]()