# Center in a container

**URL:** <https://forums.realmacsoftware.com/t/center-in-a-container/43910>\
**Category:** Elements\
**Created:** [July 27, 2024, 5:47am UTC](https://forums.realmacsoftware.com/t/center-in-a-container/43910 "2024-07-27T05:47:51Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bruno](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/bruno/32/25457_2.png) [@Bruno](https://forums.realmacsoftware.com/u/Bruno)\
**Post date:** [July 27, 2024, 5:47am UTC](https://forums.realmacsoftware.com/t/center-in-a-container/43910/1 "2024-07-27T05:47:51Z")

</div>

Hi, I noticed that it was still difficult to simply center an item that you place in a container (image, video, paragraph, …). It is always aligned to the left and you have to play with the padding. Could we imagine a WYSIWYG world in which when we indicate the alignment in the container is “center” then the item placed in the container ends up in the center? I encounter this problem under RW/Stacks, I would have really loved to no longer see it with Elements. 🙏

---

<div class="post-metadata">

**Author:** ![upssjw](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/upssjw/32/26063_2.png) [@upssjw](https://forums.realmacsoftware.com/u/upssjw)\
**Post date:** [July 27, 2024, 6:30am UTC](https://forums.realmacsoftware.com/t/center-in-a-container/43910/2 "2024-07-27T06:30:51Z")

</div>

echo some of that, may not be possible in all cases but I am now dropping a single flex into the container or section and centring using the flex. not sure how my issue of not being able to see different elements one you start dropping text / images into a container / section and having to revert to using the tree rather than wysiwyg, I have adjusted to that, but as I said before new users may find this frustrating for wysiwyg. But that said I am finding it straight forward and think this will be a powerful app, 😀

---

<div class="post-metadata">

**Author:** ![Bruno](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/bruno/32/25457_2.png) [@Bruno](https://forums.realmacsoftware.com/u/Bruno)\
**Post date:** [July 27, 2024, 7:21am UTC](https://forums.realmacsoftware.com/t/center-in-a-container/43910/3 "2024-07-27T07:21:26Z")

</div>

Ok with what you said but we’re in 21st century so center would be easy in a hurry. 🤭

---

<div class="post-metadata">

**Author:** ![trinube](https://avatars.discourse-cdn.com/v4/letter/t/df788c/32.png) [@trinube](https://forums.realmacsoftware.com/u/trinube)\
**Post date:** [July 31, 2024, 12:19pm UTC](https://forums.realmacsoftware.com/t/center-in-a-container/43910/4 "2024-07-31T12:19:30Z")

</div>

I’ve just spent 20 minutes trying to work out how to do this - I clearly should have read all the beta feedback before starting.  
A simple way to centre a container seems like something which should exist.  
Needing a container, flex box, flex item and image seems overkill to simply centre an image on a page.  
Of course I may just be doing something totally wrong - it’s a long time since I’ve had to learn a new app from scratch.

---

<div class="post-metadata">

**Author:** ![anon68150607](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@anon68150607](https://forums.realmacsoftware.com/u/anon68150607)\
**Post date:** [July 31, 2024, 12:30pm UTC](https://forums.realmacsoftware.com/t/center-in-a-container/43910/5 "2024-07-31T12:30:42Z")

</div>

Yeah @trinube, technically you can do this in Tailwind with just a container and an image (see below), but Elements seems to be pushing nesting unnecessary containers — which will become a nightmare to manage as pages get more complex, especially with drag and drop — making the node/structure view an essential tool rather than an optional one.

```auto
<div class="flex items-center justify-center h-screen">
  <img src="i-am-a-centered.png" />
</div>

```

One thing I’m finding is that the mental model in Elements is currently more developer oriented than user oriented. Yes, flex boxes are wonderful, and it’s great to use examples that will help users learn more about how the web works, but at the end of the day much of the technical details aren’t really necessary in Elements.

My opinion is that creating pages/a site in Elements should be as easy, _and enjoyable_ as creating a page/newsletter in Apple Pages. And unlike Apple Pages, if I **need** to go a little deeper and feel like writing a little code in Elements I can, but you shouldn’t need to know how HTML and CSS works (or rtf, docx, epub or PostScript in the case of Pages) just to create something wonderful.

---

<div class="post-metadata">

**Author:** ![Flash](https://avatars.discourse-cdn.com/v4/letter/f/f475e1/32.png) [@Flash](https://forums.realmacsoftware.com/u/Flash)\
**Post date:** [July 31, 2024, 1:53pm UTC](https://forums.realmacsoftware.com/t/center-in-a-container/43910/6 "2024-07-31T13:53:06Z")

</div>

This very topic is a good focus point for when do we cross the line for simple versus features, or better yet, what defines simple.

Do we add a bunch of functionality to every container? Retaining all functionality is what is expected in a coding. Or,

Do we require certain containers for certain tasks. Sacrifice functionality for “ease of use” from a non-coders viewpoint.

---

<div class="post-metadata">

**Author:** ![Flash](https://avatars.discourse-cdn.com/v4/letter/f/f475e1/32.png) [@Flash](https://forums.realmacsoftware.com/u/Flash)\
**Post date:** [July 31, 2024, 1:54pm UTC](https://forums.realmacsoftware.com/t/center-in-a-container/43910/7 "2024-07-31T13:54:08Z")

</div>

> [@anon68150607](#):
>
> Elements should be as easy, _and enjoyable_ as creating a page/newsletter in Apple Pages.

If it’s me, YES! This is spot on.

---

<div class="post-metadata">

**Author:** ![anon68150607](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@anon68150607](https://forums.realmacsoftware.com/u/anon68150607)\
**Post date:** [July 31, 2024, 1:57pm UTC](https://forums.realmacsoftware.com/t/center-in-a-container/43910/8 "2024-07-31T13:57:47Z")

</div>

> [@Flash](#):
>
> Do we require certain containers for certain tasks. Sacrifice functionality for “ease of use” from a non-coders viewpoint.

I think that presenting the user with too many container options to choose from will cause more confusion than having one flexible (block, flex, grid) container that can easily be configured as they wish.

---

<div class="post-metadata">

**Author:** ![Flash](https://avatars.discourse-cdn.com/v4/letter/f/f475e1/32.png) [@Flash](https://forums.realmacsoftware.com/u/Flash)\
**Post date:** [July 31, 2024, 2:02pm UTC](https://forums.realmacsoftware.com/t/center-in-a-container/43910/9 "2024-07-31T14:02:32Z")

</div>

We are on the same page, I simply presented this as a contrast of options. There may even be more options. This piggybacks off [this thread](https://forums.realmacsoftware.com/t/max-width-of-containers/43857/10).
