How do I make images in product description to take the full width of the screen?
On mobile view
How do I make images in product description to take the full width of the screen?
On mobile view
Hi Shroud, do you have a link to your site so that we can take a look? Should hopefully be attainable with some style or class attributes.
Hereâs the site Luxandluxy .com
Hi Shroud,
This may be a bit tricky since your site on mobile has a padding of -1.5rem applied to the left and right of the entire section which contains the product photos, info, and description.
You could set the padding for this section to 0, then go through and apply padding to each element besides the photos in the product description. This would be the way to ultimately remove the padding, but would pretty laborious and leaves too much room for error if you miss reapplying the padding to any element.
Instead, as a work around, you could add this code to your product page template to apply a margin, size, and border radius adjustment to make the images full screen width. This wonât be a perfect fix, but it will get you more of the look youâre after.
â
Let me know how this works for you and if you have any questions about the process. Again, this wonât be a perfect fix, but should manipulate the images enough to get them looking more full screen for you.
The effect isnât what Iâm looking for. Forget the images. I need this black
https://luxandluxy.com/products/magnetic-anti-peep-tempered-glass-privacy-metal-iphone-case
Set the margin of that div to -1.5rem, and set the margin of the photo at the top with the degrees demonstration to auto. This should expand the black background and center that photo
Ok first of all there is no âproduct.liquid file within Templates folderâ in Sense theme.
So I instead pasted the code in âmain-product.liquidâ within Sections folder
Also I changed up your code to get the effect I wanted.
I put this instead:
@media screen and (max-width: 768px){ .product__description div{ margin-left: -1.5rem; margin-right: -1.5rem; border-radius: 0px !important; max-width: 108% !important; } } âSo far so good. But Iâll check for if there are any errors around my store
Sounds good. Apologies for any confusion regarding the liquid file names. Itâs hard to tell what some theme files will be called, so outside looking in I have to make some generalities about what the file names will be, but it sounds like you stuck the code in the right spot. Let me know if it continues to give you issues.