What's your biggest current challenge? Have your say in Community Polls along the right column.

Re: how to force images to center on product edit page

how to force images to center on product edit page

FrangoFit
Tourist
5 0 1

I already try to edit the images and send them to the middle several times in the Shopify editor, but they don't obey this command, how do I force them to go to the middle of the page;

the images below are showing how the images are on the left of the product page and not in the middle.

d8635b81-2eb0-473a-b674-7e357b8a1cb6.jpg

tst img.jfif

 

Replies 3 (3)

made4Uo
Shopify Partner
3856 717 1200

Hi @FrangoFit 

 

Please add follow the instructions below.

 

1. From you Admin page, go to Online store > Themes > Click the three dots on the theme you want to edit > Edit code
2. Go to Asset folder and open the theme.css file
3. At very end of the code, add the code below

 

.rte div[style='text-align: center;'] > img {
    margin: auto;
}

 

Result here:

made4Uo_0-1686966772590.png

 

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free
FrangoFit
Tourist
5 0 1

the code worked on most of the images, but some were still on the left of the page as in the image below, I don't know why it is like this,

as I said before in the image editor everything is right in the middle, but on the store page, some images still are to the left.

But thanks in advance for your time and attention and also for the code haha.

tst img.jpg

tst img 1.jpg

Gavinn
Visitor
1 0 0

Hi FrangoFit ,

Have you solve this problem ? I have go the same !