Centering image on mobile

I want the image to be properly centered on mobile… how to achieve it? thanks in advance

Put the image in a div container, then center it in there.

I put the image in a div… but seems i didn’t center it correctly. setting left and right margins as ‘auto’ didn’t do it. How to center it there? Help would super appreciated!

You have the image in the div correctly.

In the elements list, select the div block with the image.

Then, in the div’s details, slide down to the typography sections and select “center” as you would for text.

That centers the image in the div.

You can use padding within the div to move the image right/left or up/down as desired.

For divs, you can float content left or right, but not centered, so you need to use the text-align:center css to do it. Just select the div then for the attributes, use the text-center icon to do it.

Regards.

1 Like

This topic was automatically closed 125 days after the last reply. New replies are no longer allowed.