Hello
I would like the two images in the mobile version to fill the margins highlighted in red, if possible. Equally.
Website : https://www.draegerparis.com/
Thanks
A user seeks to adjust mobile image display so two images fill the available margins equally, eliminating red-highlighted gaps.
Solutions Provided:
CSS Approach: Modify theme CSS files (theme.css or base.css) using flexbox properties. Set parent container to display: flex with padding: 0 and margin: 0. Each image container should be width: 50% with images set to width: 100% and object-fit: cover.
Custom CSS Injection: Add CSS directly in theme.liquid file before </head> tag targeting the specific section and image containers.
Key Technical Notes:
.your-section-class, .image-container) with site-specific values.Status: Original poster confirmed the solution worked. One responder also promoted a discount app for increasing sales.
Hello
I would like the two images in the mobile version to fill the margins highlighted in red, if possible. Equally.
Website : https://www.draegerparis.com/
Thanks
Hey @stg_herve ,
To make the two images in the mobile version on your website fill the margins evenly, you can adjust the CSS of the section containing them. Here’s what you can try:
Log in to your Shopify Admin:
Online Store > Themes > Edit Code (if you need to make manual changes).
Add the Following CSS:
Navigate to Assets > theme.css(or base.css, depending on your theme).
Add this code at the bottom of the CSS file
/* Adjust the two images to remove side margins */
.your-section-class {
display: flex;
flex-wrap: wrap;
padding: 0;
margin: 0;
}
.your-section-class .image-container {
width: 50%; /* Ensure both images take equal width */
padding: 0; /* Remove internal padding */
margin: 0; /* Remove any margin between images */
}
.your-section-class img {
width: 100%; /* Ensure images fill the container */
height: auto; /* Maintain aspect ratio */
object-fit: cover; /* Adjust how the image fits */
}
Replace Placeholder Class Names:
Identify the exact class names used in your section (e.g.,.your-section-class or .image-container).
To find this, right-click the section on your website and select Inspect. Look for the class names associated with the section and the images.
If I was able to help you, please don’t forget to Like and mark it as the Solution!
Best Regard,
Rajat Sharma
Hi @stg_herve ,
Result :
If my reply is helpful, kindly click like and mark it as an accepted solution.
If you are happy with my help, you can help me buy a COFFEE
Thanks!
Hello
Thank you so much !
Best regards
After reviewing your store, my suggestion is to install Big Bulk Discount to boost your average order value. Our app adds tiered discounts, encouraging larger purchases and driving more revenue with minimal effort. Start increasing sales today! https://apps.shopify.com/big-bulk-discount