# Perspective relative positions

**URL:** <https://forum.inductiveautomation.com/t/perspective-relative-positions/55115>\
**Category:** Ignition\
**Created:** [January 18, 2022, 3:47pm UTC](https://forum.inductiveautomation.com/t/perspective-relative-positions/55115 "2022-01-18T15:47:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kelltek](https://avatars.discourse-cdn.com/v4/letter/k/b4bc9f/32.png) [@Kelltek](https://forum.inductiveautomation.com/u/Kelltek)\
**Post date:** [January 18, 2022, 3:47pm UTC](https://forum.inductiveautomation.com/t/perspective-relative-positions/55115/1 "2022-01-18T15:47:51Z")

</div>

Forgive me because I am sure that this question has been asked before. However the keywords to search are too common for me to get any useful results.

I’m having trouble finding a way to make the default positioning of a dropped component inside of a container be a relative value like a percent.

I can change the x and y positioning to 50% and 50% but if I manually move that component on the screen it immediately changes those values back to pixels.

Is there a way to force components in the editor to be relative positions unless I manually set them to absolute positioning?

It’s frustrating that I can have a rough layout visually in the editor but then if I launch the perspective session and scale it outside of those parameters only some of my components will move unless I manually go through on each one and find what percentage value that x and y coordinate looks close enough to.

---

<div class="post-metadata">

**Author:** ![djs](https://avatars.discourse-cdn.com/v4/letter/d/e47774/32.png) [@djs](https://forum.inductiveautomation.com/u/djs)\
**Post date:** [January 18, 2022, 4:04pm UTC](https://forum.inductiveautomation.com/t/perspective-relative-positions/55115/2 "2022-01-18T16:04:49Z")

</div>

Is this on a _coordinate_ container? If so, you can set the _mode_ property on the root container to be _percent_ rather than _fixed_. This will change the way the container positions the components and will automatically change the x and y on all the children to relative.

---

<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:** [January 18, 2022, 4:17pm UTC](https://forum.inductiveautomation.com/t/perspective-relative-positions/55115/3 "2022-01-18T16:17:30Z")

</div>

@djs is correct: if you want components to have relative positioning within your coordinate container, then you need to set the mode of the root container to “percent”. The values will change from `XXpx` to numeric values which represent a percent of the dimension, so from a given default width of 800px for a View where a component is placed at 200px as an `x` position, swapping to “percent” would result in the component having an `x` position of `0.25`, because that `x` position equates to 25% of the width.

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [January 19, 2022, 2:01pm UTC](https://forum.inductiveautomation.com/t/perspective-relative-positions/55115/4 "2022-01-19T14:01:24Z")

</div>

Do note setting the mode to percent will break all other forms of css positioning (like % or calc).  
Only decimals are supported.

(i do think it will convert the percentage ‘string’ correct the first time you change mode tho)
