# Centering Subview

**URL:** <https://forum.inductiveautomation.com/t/centering-subview/89463>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [April 25, 2024, 3:29pm UTC](https://forum.inductiveautomation.com/t/centering-subview/89463 "2024-04-25T15:29:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CTrenkamp](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ctrenkamp/32/38440_2.png) [@CTrenkamp](https://forum.inductiveautomation.com/u/CTrenkamp)\
**Post date:** [April 25, 2024, 3:29pm UTC](https://forum.inductiveautomation.com/t/centering-subview/89463/1 "2024-04-25T15:29:56Z")

</div>

I have a small subview table with only 3 columns inside another, wider table. Is it possible to center the subview table in the middle of the bigger table when it is expanded? Currently it displays to the left side.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/0/7021349ef5e867fb009c7a59d64bfe68032bd5a5.png)

---

<div class="post-metadata">

**Author:** ![YF129701](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/yf129701/32/60498_2.png) [@YF129701](https://forum.inductiveautomation.com/u/YF129701)\
**Post date:** [April 25, 2024, 3:50pm UTC](https://forum.inductiveautomation.com/t/centering-subview/89463/2 "2024-04-25T15:50:38Z")

</div>

Is the view you have set as the Subview in a Flex container? If it is, I would try to center it there (in the view) and that SHOULD carry over to the table subview. If that doesn't work, there is definitely a CSS property you can add to the Advanced Stylesheet. The first option I mentioned above is the more obvious one, so I would try that first.

---

<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:** [April 25, 2024, 6:08pm UTC](https://forum.inductiveautomation.com/t/centering-subview/89463/3 "2024-04-25T18:08:23Z")

</div>

Yes, configure the subview itself to use the appropriate flex property (can't ever remember their names, probably `justify: center` ?).  
If it's a coordinate view, you can use something like `calc(50% - {table_with} / 2)` on the table's `x` property. Or use `percent` mode. But I hate percent mode.
