How to fix layout of images on product pages for desktop

Solved

How to fix layout of images on product pages for desktop

Allen6224
Excursionist
42 0 11

Hi,

The material images on the product pages of website now show vertically on desktop view.

 

They previously showed side by side which i want. For some reason they switched to vertical on desktop and i want them back to side by side. See below for Screenshot and code. My website is www.liftchairheaven.com


Product Page showing material images vertical for desktop view

Allen6224_0-1716186582414.png

 


Code for the images

<div id="gallery" style="text-align: center;">
<div style="text-align: center;">
<strong><span style="display: block;">Light Gray</span></strong> <img alt="Miralux fabric in light gray color" src="https://cdn.shopify.com/s/files/1/0746/8358/0713/files/1-psc_texture_bris_gray.jpg?v=1709326195" class="img" id="img1" style="margin-top: 16px; float: none;" onclick="change(this)">
</div>
<div style="text-align: center;">
<strong><span style="display: block;">Saddle</span></strong> <img alt="Miralux fabric in saddle color" src="https://cdn.shopify.com/s/files/1/0746/8358/0713/files/3-psc_texture_brisa_saddle.jpg?v=1709326226" class="img" id="img2" style="margin-top: 16px; float: none;" onclick="change(this)">
</div>
<div style="text-align: center;">
<strong><span style="display: block;">Chocolate</span></strong> <img alt="Miralux fabric in chocolate brown color" src="https://cdn.shopify.com/s/files/1/0746/8358/0713/files/Brisa-Spectra-Barista-SBA.jpg?v=1709326152" class="img" id="img3" style="margin-top: 16px; float: none;" onclick="change(this)">
</div>
</div>


Thanks,
Allen Reynolds

Accepted Solution (1)

Dan-From-Ryviu
Shopify Partner
11349 2224 2397

This is an accepted solution.

Hi @Allen6224 

You can update the code to this and check again. 

 

<style>
@media (min-width: 990px) {
#gallery {
display: flex; 
justify-content: space-evenly;
}
}
</style>
<div id="gallery" style="text-align: center;">
<div style="text-align: center;">
<strong><span style="display: block;">Light Gray</span></strong> <img alt="Miralux fabric in light gray color" src="https://cdn.shopify.com/s/files/1/0746/8358/0713/files/1-psc_texture_bris_gray.jpg?v=1709326195" class="img" id="img1" style="margin-top: 16px; float: none;" onclick="change(this)">
</div>
<div style="text-align: center;">
<strong><span style="display: block;">Saddle</span></strong> <img alt="Miralux fabric in saddle color" src="https://cdn.shopify.com/s/files/1/0746/8358/0713/files/3-psc_texture_brisa_saddle.jpg?v=1709326226" class="img" id="img2" style="margin-top: 16px; float: none;" onclick="change(this)">
</div>
<div style="text-align: center;">
<strong><span style="display: block;">Chocolate</span></strong> <img alt="Miralux fabric in chocolate brown color" src="https://cdn.shopify.com/s/files/1/0746/8358/0713/files/Brisa-Spectra-Barista-SBA.jpg?v=1709326152" class="img" id="img3" style="margin-top: 16px; float: none;" onclick="change(this)">
</div>
</div>

 

 

- Found this helpful? Hit "Like" and "Accept as Solution"!
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image
Built for Shopify

Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- En...
Sign up now.

View solution in original post

Replies 4 (4)

Moeed
Shopify Partner
7055 1899 2325

Hey @Allen6224 

 

I'm unable to locate this product page on your website, can you share a link of that product page?

 

Best Regards,

Moeed

- Need a Shopify Specialist? Chat on WhatsApp

- Get a quick Shopify quote – Click here!

- Custom Design | Advanced Coding | Store Modifications


Dan-From-Ryviu
Shopify Partner
11349 2224 2397

This is an accepted solution.

Hi @Allen6224 

You can update the code to this and check again. 

 

<style>
@media (min-width: 990px) {
#gallery {
display: flex; 
justify-content: space-evenly;
}
}
</style>
<div id="gallery" style="text-align: center;">
<div style="text-align: center;">
<strong><span style="display: block;">Light Gray</span></strong> <img alt="Miralux fabric in light gray color" src="https://cdn.shopify.com/s/files/1/0746/8358/0713/files/1-psc_texture_bris_gray.jpg?v=1709326195" class="img" id="img1" style="margin-top: 16px; float: none;" onclick="change(this)">
</div>
<div style="text-align: center;">
<strong><span style="display: block;">Saddle</span></strong> <img alt="Miralux fabric in saddle color" src="https://cdn.shopify.com/s/files/1/0746/8358/0713/files/3-psc_texture_brisa_saddle.jpg?v=1709326226" class="img" id="img2" style="margin-top: 16px; float: none;" onclick="change(this)">
</div>
<div style="text-align: center;">
<strong><span style="display: block;">Chocolate</span></strong> <img alt="Miralux fabric in chocolate brown color" src="https://cdn.shopify.com/s/files/1/0746/8358/0713/files/Brisa-Spectra-Barista-SBA.jpg?v=1709326152" class="img" id="img3" style="margin-top: 16px; float: none;" onclick="change(this)">
</div>
</div>

 

 

- Found this helpful? Hit "Like" and "Accept as Solution"!
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image
Built for Shopify

Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- En...
Sign up now.

BSSCommerce-HDL
Shopify Partner
2305 835 908

Hi @Allen6224

You can try this code by following these steps:

Step 1: Go to Shopify Admin -> Online Store ->Theme -> Edit code

BSSTechVenture_1-1716188629948.png

 

Step 2: Search file base.css, theme.css or styles.css 

BSSTechVenture_2-1716188640955.png

 

Step 3: Insert the below code at the bottom of the file -> Save

div#gallery {
    display: flex !important;
    justify-content: space-between !important;
}

 

Here is result: 

BSSTechVenture_0-1716188497006.png

Hope this can help you,

If our suggestions are useful, please let us know by giving it a like or marking it as a solution. Thank you 😍

Sale banner, pop ups: Customize your sale banner, pop-ups and create countdown bar to boost conversion rate.
Simicart: Transform your Shopify store into a stunning and fully functional mobile app with just a few simple steps.
Product Labels & Badges:
Get more sales with striking labels, badges, and banners from our 10,000+ available templates.

BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now

PageFly-Noah
Shopify Partner
1317 233 281

 

This is Noah from PageFly - Shopify Page Builder App

Hi @Allen6224  Please edit code like here. Thank you.

 

<div id="gallery" style="text-align: center; display:flex">
<div style="text-align: center;">
<strong><span style="display: block;">Light Gray</span></strong> <img alt="Miralux fabric in light gray color" src="https://cdn.shopify.com/s/files/1/0746/8358/0713/files/1-psc_texture_bris_gray.jpg?v=1709326195" class="img" id="img1" style="margin-top: 16px; float: none;" onclick="change(this)">
</div>
<div style="text-align: center;">
<strong><span style="display: block;">Saddle</span></strong> <img alt="Miralux fabric in saddle color" src="https://cdn.shopify.com/s/files/1/0746/8358/0713/files/3-psc_texture_brisa_saddle.jpg?v=1709326226" class="img" id="img2" style="margin-top: 16px; float: none;" onclick="change(this)">
</div>
<div style="text-align: center;">
<strong><span style="display: block;">Chocolate</span></strong> <img alt="Miralux fabric in chocolate brown color" src="https://cdn.shopify.com/s/files/1/0746/8358/0713/files/Brisa-Spectra-Barista-SBA.jpg?v=1709326152" class="img" id="img3" style="margin-top: 16px; float: none;" onclick="change(this)">
</div>
</div>

 

 

Hope my solution will help you resolve the issue.

Best regards,

Noah | PageFly

Please let me know if it works by giving it a Like or marking it as a solution!


PageFly - #1 Page Builder for Shopify merchants.


All features are available from Free plan. Live Chat Support is available 24/7.