# BUG: margin settings for image do not work

**URL:** <https://forums.realmacsoftware.com/t/bug-margin-settings-for-image-do-not-work/48766>\
**Category:** Elements\
**Created:** [July 11, 2025, 9:36am UTC](https://forums.realmacsoftware.com/t/bug-margin-settings-for-image-do-not-work/48766 "2025-07-11T09:36:23Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pegasus](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/pegasus/32/25035_2.png) [@Pegasus](https://forums.realmacsoftware.com/u/Pegasus)\
**Post date:** [July 11, 2025, 9:36am UTC](https://forums.realmacsoftware.com/t/bug-margin-settings-for-image-do-not-work/48766/1 "2025-07-11T09:36:23Z")

</div>

@dan

when i am setting the margins for images, I noticed that this does not works correctly.

[here is a video](https://e.pcloud.link/publink/show?code=XZYSt6ZxcpxUIrTIJ5VOzt2uPVr90eXDCS7)

---

<div class="post-metadata">

**Author:** ![Pegasus](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/pegasus/32/25035_2.png) [@Pegasus](https://forums.realmacsoftware.com/u/Pegasus)\
**Post date:** [July 11, 2025, 9:40am UTC](https://forums.realmacsoftware.com/t/bug-margin-settings-for-image-do-not-work/48766/2 "2025-07-11T09:40:11Z")

</div>

btw: same thing with the container and flex

---

<div class="post-metadata">

**Author:** ![maxken](https://avatars.discourse-cdn.com/v4/letter/m/ac91a4/32.png) [@maxken](https://forums.realmacsoftware.com/u/maxken)\
**Post date:** [July 11, 2025, 9:52am UTC](https://forums.realmacsoftware.com/t/bug-margin-settings-for-image-do-not-work/48766/3 "2025-07-11T09:52:34Z")

</div>

Is the _sizing_ width set to auto?

---

<div class="post-metadata">

**Author:** ![Pegasus](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/pegasus/32/25035_2.png) [@Pegasus](https://forums.realmacsoftware.com/u/Pegasus)\
**Post date:** [July 11, 2025, 9:57am UTC](https://forums.realmacsoftware.com/t/bug-margin-settings-for-image-do-not-work/48766/4 "2025-07-11T09:57:33Z")

</div>

no. not really. its 100% … but it still shouldn’t be like that. i think so ^^

edit:  
OK. it does not work with all elements-components if you have set sizing/size: width to 100%.

that doesn’t really make sense, does it?

---

<div class="post-metadata">

**Author:** ![maxken](https://avatars.discourse-cdn.com/v4/letter/m/ac91a4/32.png) [@maxken](https://forums.realmacsoftware.com/u/maxken)\
**Post date:** [July 11, 2025, 10:17am UTC](https://forums.realmacsoftware.com/t/bug-margin-settings-for-image-do-not-work/48766/5 "2025-07-11T10:17:25Z")

</div>

> [@Pegasus](#):
>
> OK. it does not work with all elements-components if you have set sizing/size: width to 100%.
> 
> that doesn’t really make sense, does it?

Depends on what 100% means - 100% of available space or 100% of original image size or something else? I’m assuming it refers to image size since it’s in the _sizing_ attribute.

Did you try setting it to auto? Did it fix the problem? Alternatively, try using padding (in _spacing_) instead of margin

---

<div class="post-metadata">

**Author:** ![WeaverPixel](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/weaverpixel/32/25453_2.png) [@WeaverPixel](https://forums.realmacsoftware.com/u/WeaverPixel)\
**Post date:** [July 11, 2025, 10:21am UTC](https://forums.realmacsoftware.com/t/bug-margin-settings-for-image-do-not-work/48766/6 "2025-07-11T10:21:53Z")

</div>

Hey @Pegasus

you should put a Container around your text and image. Then it is working as expected. Guess @dan has a technical explanation.

What I can say is that I am using Container, Flex or Grid extensively. A missing container or flex is often the reason why something is not working as expected

---

<div class="post-metadata">

**Author:** ![Pegasus](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/pegasus/32/25035_2.png) [@Pegasus](https://forums.realmacsoftware.com/u/Pegasus)\
**Post date:** [July 11, 2025, 10:46am UTC](https://forums.realmacsoftware.com/t/bug-margin-settings-for-image-do-not-work/48766/7 "2025-07-11T10:46:25Z")

</div>

@maxken’s comment led me look of this problem from a different angle.

i assume that I simply misunderstood this setting option and therefore did not use it as I should have ^^

---

<div class="post-metadata">

**Author:** ![dan](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/dan/32/28516_2.png) [@dan](https://forums.realmacsoftware.com/u/dan)\
**Post date:** [July 11, 2025, 7:48pm UTC](https://forums.realmacsoftware.com/t/bug-margin-settings-for-image-do-not-work/48766/8 "2025-07-11T19:48:13Z")

</div>

Did you get the problem sorted?

If not… I would recommend putting the items in a container 🙂

---

<div class="post-metadata">

**Author:** ![maxken](https://avatars.discourse-cdn.com/v4/letter/m/ac91a4/32.png) [@maxken](https://forums.realmacsoftware.com/u/maxken)\
**Post date:** [July 12, 2025, 2:27am UTC](https://forums.realmacsoftware.com/t/bug-margin-settings-for-image-do-not-work/48766/9 "2025-07-12T02:27:49Z")

</div>

I did a bit more testing of this issue and discovered the following …

The issue relates to both _Image_ and _Video_ components (possibly others but I only checked the media group) and is triggered by adding width margin to the _ **spacing** _ sizes.

The issue is not resolved by putting the element(s) in a container (there are, of course, other good reasons why they should be in one).

The issue is resolved by changing the _ **sizing** _ width to auto instead of 100% (default).

If there is no specific reason for the default sizing width to be 100%, I suggest changing the default to auto.
