# How to centre an image with a max size

**URL:** <https://forums.realmacsoftware.com/t/how-to-centre-an-image-with-a-max-size/48936>\
**Category:** Elements\
**Created:** [July 17, 2025, 12:49pm UTC](https://forums.realmacsoftware.com/t/how-to-centre-an-image-with-a-max-size/48936 "2025-07-17T12:49:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lampfancy](https://avatars.discourse-cdn.com/v4/letter/l/8e8cbc/32.png) [@Lampfancy](https://forums.realmacsoftware.com/u/Lampfancy)\
**Post date:** [July 17, 2025, 12:49pm UTC](https://forums.realmacsoftware.com/t/how-to-centre-an-image-with-a-max-size/48936/1 "2025-07-17T12:49:09Z")

</div>

Hi folks can anyone tell me what I am doing wrong. I have a an image with a max size specified, it is centered when it is on mobile and then when the window width exceeds the width of the image it moves to the left. Can anyone tell me what I am doing wrong please? I can’t work out how to centre it? Isn’t there a centre button? Thank you. The help tutorials to simply select centre but there doesn’t seem to be that option. Thanks.

 ![Screenshot 2025-07-17 at 13.45.54](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/3X/a/3/a303dc609fed6c53e8b98e4433c70fbf52763221.png)

---

<div class="post-metadata">

**Author:** ![logrunner](https://avatars.discourse-cdn.com/v4/letter/l/59ef9b/32.png) [@logrunner](https://forums.realmacsoftware.com/u/logrunner)\
**Post date:** [July 17, 2025, 12:53pm UTC](https://forums.realmacsoftware.com/t/how-to-centre-an-image-with-a-max-size/48936/2 "2025-07-17T12:53:14Z")

</div>

Try adding a class of “mx-auto” to the classes at the bottom of the inspector:

 ![CleanShot 2025-07-17 at 13.52.19](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/3X/1/d/1d1710cbf8082a456bb1b11c6ee523782212457d.png)

---

<div class="post-metadata">

**Author:** ![Lampfancy](https://avatars.discourse-cdn.com/v4/letter/l/8e8cbc/32.png) [@Lampfancy](https://forums.realmacsoftware.com/u/Lampfancy)\
**Post date:** [July 17, 2025, 1:02pm UTC](https://forums.realmacsoftware.com/t/how-to-centre-an-image-with-a-max-size/48936/3 "2025-07-17T13:02:12Z")

</div>

Doesn’t change anything I am afraid.

---

<div class="post-metadata">

**Author:** ![ercross](https://avatars.discourse-cdn.com/v4/letter/e/c57346/32.png) [@ercross](https://forums.realmacsoftware.com/u/ercross)\
**Post date:** [July 17, 2025, 1:02pm UTC](https://forums.realmacsoftware.com/t/how-to-centre-an-image-with-a-max-size/48936/4 "2025-07-17T13:02:32Z")

</div>

See previous post. In the image properties, under Spacing, enable Margin & Padding and set left and right margin to auto

---

<div class="post-metadata">

**Author:** ![Lampfancy](https://avatars.discourse-cdn.com/v4/letter/l/8e8cbc/32.png) [@Lampfancy](https://forums.realmacsoftware.com/u/Lampfancy)\
**Post date:** [July 17, 2025, 1:07pm UTC](https://forums.realmacsoftware.com/t/how-to-centre-an-image-with-a-max-size/48936/5 "2025-07-17T13:07:53Z")

</div>

Thank you Edward. You fixed it!
