# WebContainer width wrong

**URL:** <https://forum.xojo.com/t/webcontainer-width-wrong/87864>\
**Category:** Web\
**Created:** [March 14, 2026, 12:36am UTC](https://forum.xojo.com/t/webcontainer-width-wrong/87864 "2026-03-14T00:36:35Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris\_Halford](https://forum.xojo.com/user_avatar/forum.xojo.com/chris_halford/32/480_2.png) [@Chris\_Halford](https://forum.xojo.com/u/Chris_Halford)\
**Post date:** [March 14, 2026, 12:36am UTC](https://forum.xojo.com/t/webcontainer-width-wrong/87864/1 "2026-03-14T00:36:35Z")

</div>

I have a web container sub classed and set in a web page by the designer (not code)

The container does not report its correct width until the window has been resized.

My workaround is to put an invisible control on the right edge and lock it’s position.

I added a getWidth() function which returns the control’s left and width.

This works, but it seems very strange to need it.

This is 2025r3.  
I can’t find an issue just like this, but am wondering if anyone else has experienced it.

I only noticed because the container adds more containers within it and determines how many columns based on it’s width.

---

<div class="post-metadata">

**Author:** ![AlbertoD](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/dbc845/32.png) [@AlbertoD](https://forum.xojo.com/u/AlbertoD)\
**Post date:** [March 14, 2026, 3:13am UTC](https://forum.xojo.com/t/webcontainer-width-wrong/87864/2 "2026-03-14T03:13:55Z")

</div>

Create an Issue and add a sample project.

I think I read something like this but not sure if it was a reported issue.

---

<div class="post-metadata">

**Author:** ![Greg\_O](https://forum.xojo.com/user_avatar/forum.xojo.com/greg_o/32/22785_2.png) [@Greg\_O](https://forum.xojo.com/u/Greg_O)\
**Post date:** [March 14, 2026, 11:54am UTC](https://forum.xojo.com/t/webcontainer-width-wrong/87864/3 "2026-03-14T11:54:35Z")

</div>

@Chris_Halford you know that the flex layout option does that for you, right? The column management stuff.

---

<div class="post-metadata">

**Author:** ![Chris\_Halford](https://forum.xojo.com/user_avatar/forum.xojo.com/chris_halford/32/480_2.png) [@Chris\_Halford](https://forum.xojo.com/u/Chris_Halford)\
**Post date:** [March 14, 2026, 12:13pm UTC](https://forum.xojo.com/t/webcontainer-width-wrong/87864/4 "2026-03-14T12:13:11Z")

</div>

No, I’m not aware of what you are referring to.

---

<div class="post-metadata">

**Author:** ![Greg\_O](https://forum.xojo.com/user_avatar/forum.xojo.com/greg_o/32/22785_2.png) [@Greg\_O](https://forum.xojo.com/u/Greg_O)\
**Post date:** [March 14, 2026, 12:29pm UTC](https://forum.xojo.com/t/webcontainer-width-wrong/87864/5 "2026-03-14T12:29:25Z")

</div>

The flex layout option lets other containers flow into the space, either left to right or top to bottom. It’s a mechanism for holding items when you don’t know how many there might be. It should be available in the container’s inspector when placed on the page.

---

<div class="post-metadata">

**Author:** ![Anthony\_G\_Cyphers](https://forum.xojo.com/user_avatar/forum.xojo.com/anthony_g_cyphers/32/16862_2.png) [@Anthony\_G\_Cyphers](https://forum.xojo.com/u/Anthony_G_Cyphers)\
**Post date:** [March 14, 2026, 12:35pm UTC](https://forum.xojo.com/t/webcontainer-width-wrong/87864/6 "2026-03-14T12:35:32Z")

</div>

You can refer to the example project in [this post](https://forum.xojo.com/t/responsive-web-application/64112/5) (by me) for using the Flex layout.

---

<div class="post-metadata">

**Author:** ![Chris\_Halford](https://forum.xojo.com/user_avatar/forum.xojo.com/chris_halford/32/480_2.png) [@Chris\_Halford](https://forum.xojo.com/u/Chris_Halford)\
**Post date:** [March 14, 2026, 12:45pm UTC](https://forum.xojo.com/t/webcontainer-width-wrong/87864/7 "2026-03-14T12:45:20Z")

</div>

Thanks to both of you.
