# Can't center StackPanel

**URL:** <https://forum.babylonjs.com/t/cant-center-stackpanel/27670>\
**Category:** Questions\
**Created:** [February 15, 2022, 11:07am UTC](https://forum.babylonjs.com/t/cant-center-stackpanel/27670 "2022-02-15T11:07:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Regit](https://avatars.discourse-cdn.com/v4/letter/r/6a8cbe/32.png) [@Regit](https://forum.babylonjs.com/u/Regit)\
**Post date:** [February 15, 2022, 11:07am UTC](https://forum.babylonjs.com/t/cant-center-stackpanel/27670/1 "2022-02-15T11:07:16Z")

</div>

Hello,

How come I can’t access vertical/horizontal alignment of my stack panel?

Please take a look: [Babylon.js Playground](https://playground.babylonjs.com/#LW7MV4)

---

<div class="post-metadata">

**Author:** ![Blake](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/blake/32/21509_2.png) [@Blake](https://forum.babylonjs.com/u/Blake)\
**Post date:** [February 15, 2022, 12:48pm UTC](https://forum.babylonjs.com/t/cant-center-stackpanel/27670/2 "2022-02-15T12:48:56Z")

</div>

Hey there, linkWithMesh() sets the control’s alignment, so moved the code to set alignment manually after calling it. 🙂

> **[Babylon.js Playground](https://playground.babylonjs.com/#LW7MV4%234)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes
