# Child elements not maintaining position after CSS/JS resizing

**URL:** <https://forum.bubble.io/t/child-elements-not-maintaining-position-after-css-js-resizing/140571>\
**Category:** Need help\
**Created:** [March 10, 2021, 8:32pm UTC](https://forum.bubble.io/t/child-elements-not-maintaining-position-after-css-js-resizing/140571 "2021-03-10T20:32:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AustinAllen](https://avatars.discourse-cdn.com/v4/letter/a/58956e/32.png) [@AustinAllen](https://forum.bubble.io/u/AustinAllen)\
**Post date:** [March 10, 2021, 8:32pm UTC](https://forum.bubble.io/t/child-elements-not-maintaining-position-after-css-js-resizing/140571/1 "2021-03-10T20:32:20Z")

</div>

I have searched far and wide for a fix for the issue I am having when resizing a group. The child groups/elements remain in place after its parent is resized. Im sure I am missing something in the numerous post ive read involving dynamic resizing but I couldn’t see anything specially involving the child elements.

**Here is what I am trying to achieve**

I am trying to have a group element take up 50% of the viewport and be centered while keeping its child groups relative position the same.

![image1](https://us1.discourse-cdn.com/bubble/original/3X/d/c/dc3d72f1ee65cd9623288fbbe541776346d263fd.png)

**What I am getting**  
The group gets resized correctly but the child elements stay in place and do not adjust to the new group size. Using the multiple code snippets/plugins that I have found the issue still seems to remain the same throughout all methods.

![image 2](https://us1.discourse-cdn.com/bubble/original/3X/f/d/fdfc8d231a84416c772dfec1bb57d5cdae7a66bd.png)

**What I am already doing**

I have used the the javascript code found in [this post](http://forum.bubble.io/t/setting-a-group-to-be-of-viewport-height-dynamically/12700/26) where an HTML element is target within the group and called via a javascript workflow,

I have used the plugin **CSS Tools** but I am still trying to learn how that works exactly. I have gotten it to resize my group via its ID but havent been able to get anywhere else with it.

I have also tried using multiple dynamic resizing plugins and changed elements height and width using a % formula and then repositioning them via the **Mouse and Elements + Move** plug in, however that became very tedious as the page became more complex.

Any suggestions on where to look for an answer would help me out alot. Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [May 19, 2021, 8:33pm UTC](https://forum.bubble.io/t/child-elements-not-maintaining-position-after-css-js-resizing/140571/2 "2021-05-19T20:33:08Z")

</div>

Closed on May 19, 2021, 8:33pm UTC

This topic was automatically closed after 70 days. New replies are no longer allowed.
