# Column width problem in a perspective table

**URL:** <https://forum.inductiveautomation.com/t/column-width-problem-in-a-perspective-table/91677>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [June 11, 2024, 11:04am UTC](https://forum.inductiveautomation.com/t/column-width-problem-in-a-perspective-table/91677 "2024-06-11T11:04:14Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aiasa21](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Aiasa21](https://forum.inductiveautomation.com/u/Aiasa21)\
**Post date:** [June 11, 2024, 11:04am UTC](https://forum.inductiveautomation.com/t/column-width-problem-in-a-perspective-table/91677/1 "2024-06-11T11:04:14Z")

</div>

Good afternoon,  
I have some problems with a perspective table, if I don't set a column width it should adjust the width automatically but it wrap the text..

In any case if I set a strict width it doesn't work.

This is the result when I don't set a width

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/5/75c4e6387f350dcfdee4d6918fd55661b24ea53e.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/7/3730785838c38842df474d1fad6a0ad04257cbbf.png)

and if I set a width it doesn't work

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/3/13fca851858c4c1b1b017092c841f8155180e95a.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/4/a4bf178bee087edbbc2e16f761be454c892d2f83.png)

---

<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:** [June 11, 2024, 12:25pm UTC](https://forum.inductiveautomation.com/t/column-width-problem-in-a-perspective-table/91677/2 "2024-06-11T12:25:36Z")

</div>

try setting a `width` value for the non-strict version. IIRC, it behaves like `flex-grow` when in non-strict mode. I think.

---

<div class="post-metadata">

**Author:** ![Aiasa21](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Aiasa21](https://forum.inductiveautomation.com/u/Aiasa21)\
**Post date:** [June 11, 2024, 12:28pm UTC](https://forum.inductiveautomation.com/t/column-width-problem-in-a-perspective-table/91677/3 "2024-06-11T12:28:21Z")

</div>

I just set for example 200px with the strictWidth disable and it's not working. Something strange things happen in Perspective 🤣

---

<div class="post-metadata">

**Author:** ![Alejandro\_Alaco](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alejandro_alaco/32/59849_2.png) [@Alejandro\_Alaco](https://forum.inductiveautomation.com/u/Alejandro_Alaco)\
**Post date:** [June 11, 2024, 12:32pm UTC](https://forum.inductiveautomation.com/t/column-width-problem-in-a-perspective-table/91677/4 "2024-06-11T12:32:17Z")

</div>

Take out the px, use just 200, not 200px,

perspective put px by default

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/5/855f13be32ccbbb5df07bf23c55cb3981a303081.png)

---

<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:** [June 11, 2024, 12:33pm UTC](https://forum.inductiveautomation.com/t/column-width-problem-in-a-perspective-table/91677/5 "2024-06-11T12:33:00Z")

</div>

if you disable `strictWidth`, it won't accept the same kind of value as it does in strict mode. As I said, I believe it behaves like `flex-grow`. You can't use `px` there.

---

<div class="post-metadata">

**Author:** ![Aiasa21](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Aiasa21](https://forum.inductiveautomation.com/u/Aiasa21)\
**Post date:** [June 11, 2024, 12:35pm UTC](https://forum.inductiveautomation.com/t/column-width-problem-in-a-perspective-table/91677/6 "2024-06-11T12:35:53Z")

</div>

Yes, you both are right, if I remove `px` I can set the width.

Anyway, why in your opinion the column doesn't adjust the width automatically in no-strict mode?

---

<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:** [June 11, 2024, 12:52pm UTC](https://forum.inductiveautomation.com/t/column-width-problem-in-a-perspective-table/91677/7 "2024-06-11T12:52:37Z")

</div>

Because it would need to go through its content to figure out what width it needs, and then it brings another batch of problems when you consider that the contents can be virtualized, that you can have pagers, etc.  
Set the width you need, disable `resizable`, and you'll be fine.

---

<div class="post-metadata">

**Author:** ![Brandon\_Peterson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/brandon_peterson/32/32960_2.png) [@Brandon\_Peterson](https://forum.inductiveautomation.com/u/Brandon_Peterson)\
**Post date:** [June 11, 2024, 12:53pm UTC](https://forum.inductiveautomation.com/t/column-width-problem-in-a-perspective-table/91677/8 "2024-06-11T12:53:30Z")

</div>

I believe you're right about this. I've run into similar formatting issues before. When I try to add padding (and/or other styles) to different parts of the table, the columns line up with the headers correctly only some of the time. I think it doesn't quite work properly in `flex-grow` mode. Is anyone aware of an existing bug report for this?

---

<div class="post-metadata">

**Author:** ![Aiasa21](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Aiasa21](https://forum.inductiveautomation.com/u/Aiasa21)\
**Post date:** [June 11, 2024, 6:50pm UTC](https://forum.inductiveautomation.com/t/column-width-problem-in-a-perspective-table/91677/9 "2024-06-11T18:50:22Z")

</div>

I work in this way, thank you @pascal.fragnoud 👍🏻
