# Z-index not populating to html

**URL:** <https://forum.inductiveautomation.com/t/z-index-not-populating-to-html/90915>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [May 25, 2024, 8:39pm UTC](https://forum.inductiveautomation.com/t/z-index-not-populating-to-html/90915 "2024-05-25T20:39:30Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![PFollansbee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pfollansbee/32/46440_2.png) [@PFollansbee](https://forum.inductiveautomation.com/u/PFollansbee)\
**Post date:** [May 25, 2024, 8:39pm UTC](https://forum.inductiveautomation.com/t/z-index-not-populating-to-html/90915/1 "2024-05-25T20:39:30Z")

</div>

Trying to work with z-index to have different parts overlap.

Not sure if I am doing something wrong, but if I set an object to have a non-zero z-index, it doesn't come through to the source. Setting to zero seems fine.

Running 8.1.35

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/9/290a1f69cfc86bc784580662a8bd5a3d2c208acd.png)

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/8/d87c1118edce6efe7193ef1cb61c51e8d984904b.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/6/168bfb6dd18956831f3a1d262ebccfb1a381dc52.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/a/9a73758cb60df42d3ce7ff2606b8411c122b3746.png)

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [May 25, 2024, 8:46pm UTC](https://forum.inductiveautomation.com/t/z-index-not-populating-to-html/90915/2 "2024-05-25T20:46:49Z")

</div>

Perspective doesn't directly allow setting the z-index of components. The closest you will get is how the Coordinate Container manages z-index relative to other components within the same container.

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [May 25, 2024, 9:02pm UTC](https://forum.inductiveautomation.com/t/z-index-not-populating-to-html/90915/3 "2024-05-25T21:02:22Z")

</div>

I'm fairly certain I have done this successfully doing CSS injection, I think, I honestly don't remember. My use case was I wanted the component being hovered to be on top.

Perhaps be more specific on your use case, other than you are just trying to set z order. Someone might have a clever idea or workaround.

---

<div class="post-metadata">

**Author:** ![PFollansbee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pfollansbee/32/46440_2.png) [@PFollansbee](https://forum.inductiveautomation.com/u/PFollansbee)\
**Post date:** [May 26, 2024, 3:47am UTC](https://forum.inductiveautomation.com/t/z-index-not-populating-to-html/90915/4 "2024-05-26T03:47:35Z")

</div>

> [@jlandwerlen](#):
>
> n I have done this successfully doing CSS injection, I think, I honestly don't remember. My use case was I wanted the component being hovered to be on top.
> 
> Perhaps be more specific on your use case, other than you are just trying to set z order. Someone might have a clever idea or workaroud.

Trying to create a 6 pixel wide resize area between objects in a flex container acting as column headings. Intended area is for resizing the columns in the table. Unfortunately a regular table will not suffice, so I can't just use that.

Knowing that z-index doesn't work, I'm thinking just a 3px box on either side (with some exceptions) that will decide which object to adjust. I expect this will be pretty ugly though. Any other suggestions would be very welcome.

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [May 26, 2024, 10:20am UTC](https://forum.inductiveautomation.com/t/z-index-not-populating-to-html/90915/5 "2024-05-26T10:20:07Z")

</div>

Why won't a table work?

---

<div class="post-metadata">

**Author:** ![PFollansbee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pfollansbee/32/46440_2.png) [@PFollansbee](https://forum.inductiveautomation.com/u/PFollansbee)\
**Post date:** [May 26, 2024, 6:02pm UTC](https://forum.inductiveautomation.com/t/z-index-not-populating-to-html/90915/6 "2024-05-26T18:02:10Z")

</div>

I haven't touched this project in a little while, but if I recall it was because I couldn't embed views in a table.

---

<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:** [May 26, 2024, 8:20pm UTC](https://forum.inductiveautomation.com/t/z-index-not-populating-to-html/90915/7 "2024-05-26T20:20:53Z")

</div>

But you **can** embed views in tables. Not just as subviews, but also as alternate rendering for table cells. Many advantages, including "virtualized" row display.

---

<div class="post-metadata">

**Author:** ![PFollansbee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pfollansbee/32/46440_2.png) [@PFollansbee](https://forum.inductiveautomation.com/u/PFollansbee)\
**Post date:** [May 26, 2024, 8:45pm UTC](https://forum.inductiveautomation.com/t/z-index-not-populating-to-html/90915/8 "2024-05-26T20:45:02Z")

</div>

Hmmm, looking at my previous post for this project is jogging my memory. This is supposed to display the results of a recursive CTE which has indeterminate depth. Anywho, that led me down the road of using a viewcanvas or a flex repeater. Both worked well for displaying the column data with the multiple levels required. I'm adding headings and resize capability, so that's how this question came about.

I'm going to reach at some straws here. It may have been an inability to embed views in a recursive fashion or not being able to line up columns of a subview to a main view.

For reference, this is what I'm trying to accomplish:

> [@UI for Recursive CTE SQL Data](https://forum.inductiveautomation.com/t/ui-for-recursive-cte-sql-data/83829):
>
> Hi! I'm trying to work through a UI to show and interact with a recursive CTE SQL query. The depth of these relationships is determined by the end user and not controlled ahead of time. My initial go at this was to create a view and recursively embed multiples of these views with a main view to build out a tree. I quickly learned that views cannot be nested into themselves. Given that self-nesting cannot occur, I'm pursuing the following as options: Programmatically placing components in compo…

---

<div class="post-metadata">

**Author:** ![PFollansbee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pfollansbee/32/46440_2.png) [@PFollansbee](https://forum.inductiveautomation.com/u/PFollansbee)\
**Post date:** [May 26, 2024, 9:13pm UTC](https://forum.inductiveautomation.com/t/z-index-not-populating-to-html/90915/11 "2024-05-26T21:13:13Z")

</div>

Yep definitely can't nest views in themselves.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/5/e5662912474e44c82652ee4e5e1b4c9c0ef70a56.png)

I think there was another reason though. My gut says I should be able to store the query data and apply a sort to that data for display without using nested views, but still display recursive data.

So, there's probably something else. I'll have to look back at my notes. Anyway, appreciate the help. As far as this topic is concerned, I can see that z-index is not a route forward.

---

<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:** [May 26, 2024, 11:02pm UTC](https://forum.inductiveautomation.com/t/z-index-not-populating-to-html/90915/13 "2024-05-26T23:02:11Z")

</div>

Ok, I remember that post. No good solution. No recursion for you!
