# Center text with respect to parent container, not flexbox

**URL:** <https://forum.inductiveautomation.com/t/center-text-with-respect-to-parent-container-not-flexbox/102721>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [February 22, 2025, 12:25am UTC](https://forum.inductiveautomation.com/t/center-text-with-respect-to-parent-container-not-flexbox/102721 "2025-02-22T00:25:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Simon\_Hathout\_Willar](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@Simon\_Hathout\_Willar](https://forum.inductiveautomation.com/u/Simon_Hathout_Willar)\
**Post date:** [February 22, 2025, 12:25am UTC](https://forum.inductiveautomation.com/t/center-text-with-respect-to-parent-container-not-flexbox/102721/1 "2025-02-22T00:25:49Z")

</div>

Hello

I'm looking to create a super simple popup that displays the data from an inspection booth. Users would like to both see the recent data, as well as download all of the data to use in excel.

However, I'm not sure how to best center this text, that says "inspection data".

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/4/e448cfadfb3208d941a17914db994f1067c7cc4f.png)

I want the text to be centered to the view (Inline with the "Station Name" label).

Right now, the root container is a column flexbox, and the row with the title and download is a row flexbox. I could add padding to the label, but that feels like a hacky solution.

Is there a better container type for this than a flexbox, or some optimal way to do this?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 22, 2025, 1:06am UTC](https://forum.inductiveautomation.com/t/center-text-with-respect-to-parent-container-not-flexbox/102721/2 "2025-02-22T01:06:58Z")

</div>

Do you work with @danielps1818 ?

See this topic:

> [@Center text to view instead of Flex Component](https://forum.inductiveautomation.com/t/center-text-to-view-instead-of-flex-component/102685):
>
> Hi! We designed a header that goes on the top of all the views. The person that did it like 2 years ago didn't center the text and I'm trying to fix it. It's a Flex View that contains the following: | Icon | Logo | Flex Container 1 | User Icon | Conf Icon | Flex Container 2 | All of those have a fix width except the Flex Container 1 that has the view tittle and has grow:1. This means that the tittle is centered to that Flex Container and not the view. Any idea on how to fix it? If I could …

---

<div class="post-metadata">

**Author:** ![Simon\_Hathout\_Willar](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@Simon\_Hathout\_Willar](https://forum.inductiveautomation.com/u/Simon_Hathout_Willar)\
**Post date:** [February 22, 2025, 1:23am UTC](https://forum.inductiveautomation.com/t/center-text-with-respect-to-parent-container-not-flexbox/102721/3 "2025-02-22T01:23:52Z")

</div>

Nope, although we do seem to be having similar issues, lol!

I suppose I'll set the button width to be fixed, and then just use a corresponding left margin to fix everything up

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [February 23, 2025, 1:23pm UTC](https://forum.inductiveautomation.com/t/center-text-with-respect-to-parent-container-not-flexbox/102721/4 "2025-02-23T13:23:04Z")

</div>

There are two (simple) solutions to that problem:

1. The one already discussed: fixed width (note that this could also be set to a percentage) button and a matching margin/padding on the other side
2. replace the parent flex container by a coordinate container. Now you can put things wherever you want.
