# Grid inner rectangles offset (GUI Editor/Grid)

**URL:** <https://forum.babylonjs.com/t/grid-inner-rectangles-offset-gui-editor-grid/44989>\
**Category:** Bugs\
**Tags:** gui, gui-editor\
**Created:** [October 18, 2023, 2:16am UTC](https://forum.babylonjs.com/t/grid-inner-rectangles-offset-gui-editor-grid/44989 "2023-10-18T02:16:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nawar](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/nawar/32/14923_2.png) [@Nawar](https://forum.babylonjs.com/u/Nawar)\
**Post date:** [October 18, 2023, 2:16am UTC](https://forum.babylonjs.com/t/grid-inner-rectangles-offset-gui-editor-grid/44989/1 "2023-10-18T02:16:45Z")

</div>

Hi all.

I discovered this thing with nested rectangles in a grid.

For some reason, the green (inner) rectangle shifts slightly to the left and then down. Inner grid always 90% width and height. Red rectangle always 100% width and height.

I am attaching screenshots

Grid 200x100 px

 ![grid_200x100](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/6/9/69a09dcd6f43fd8c5011b1346a4f3762a25d5d0e.png)

Grid 40%x25%

 ![grid_40%x25%](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/e/e/eea4458aa3d2b49da7a6047fdfe7a7eaccffa22c.png)

General screenshot. Here the red rectangles are internal. Sizes the same  
 ![main_bug](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/0/3/03a85a07ec2a51113620b18ebdd415d494037cf5.png)

---

<div class="post-metadata">

**Author:** ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)\
**Post date:** [October 18, 2023, 11:50am UTC](https://forum.babylonjs.com/t/grid-inner-rectangles-offset-gui-editor-grid/44989/2 "2023-10-18T11:50:31Z")

</div>

Hello! Can you share a GUI snippet with the problem?

---

<div class="post-metadata">

**Author:** ![Nawar](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/nawar/32/14923_2.png) [@Nawar](https://forum.babylonjs.com/u/Nawar)\
**Post date:** [October 19, 2023, 1:06am UTC](https://forum.babylonjs.com/t/grid-inner-rectangles-offset-gui-editor-grid/44989/3 "2023-10-19T01:06:41Z")

</div>

Of course!

W2QHYW

---

<div class="post-metadata">

**Author:** ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)\
**Post date:** [October 19, 2023, 2:31pm UTC](https://forum.babylonjs.com/t/grid-inner-rectangles-offset-gui-editor-grid/44989/4 "2023-10-19T14:31:52Z")

</div>

Thanks for the snippet! After some digging about with @RaananW , we think this may have to do with rounding, so I opened an issue for us to investigate more deeply: [Investigate GUI rounding · Issue #14444 · BabylonJS/Babylon.js (github.com)](https://github.com/BabylonJS/Babylon.js/issues/14444)

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [June 11, 2024, 5:46pm UTC](https://forum.babylonjs.com/t/grid-inner-rectangles-offset-gui-editor-grid/44989/5 "2024-06-11T17:46:44Z")

</div>

Hey sorry for the necroposting but can you share a repro in the PG?
