web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / BUG - Container Height...
Power Apps
Answered

BUG - Container Height not matching in Play Mode

(0) ShareShare
ReportReport
Posted on by 11

Within a component, I have a container that contains labels set to a fixed height of 30. However, when publishing the app, I find that the container seems to default to a size of 200? I do not know how this is possible as the height is hard coded. This has happened to me across multiple apps, so I assume this is an inherit bug with components. Note that this mainly happens with nested containers, if I have a root container and place everything as a child of that this usually fixes the bug. However this is not a worthwhile solution as it makes layout difficult in the app.

I have attached 2 screenshots, one of the container properties and one of what the container looks like in publish mode (with inspect element to show the dimensions).

cntHeaders_PublishMode.png
cntHeaders_EditMode.png
Categories:
  • ANB Profile Picture
    7,252 Super User 2026 Season 1 on at

    HI @HK-786 , I tried to replicate at my end:

     

    ANB_1-1710522441829.pngANB_2-1710522471822.png

    Basically you need to make sure that for container the LayoutAlignItems is not set to LayoutAlignItems.Stretch : Try to keep it LayoutAlignItems.Center or LayoutAlignItems.Start or LayoutAlignItems.End

     

    Same applies to the label control :AlignInContainer is set to Custom with Center, Start or End, but not Stretch. OR set AlignInContainer to SetByContainer

     

    -----------------------------------------------------------------------------------------------------------------------------

    I hope this helps.

    Please click Accept as solution ✅ if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs up.👍

    Thanks,
    ANB


     

     

  • HK-786 Profile Picture
    11 on at

    Hi @ANB,

    Thanks for the reply. Unfortunately that does not fix this bug. I have recreated a test component using the settings you have said with both a button and a label. With both controls setup as you said, this bug is still occurring. I have attached screenshots of the component whilst in edit mode. The component consists of one vertical container, with a button and label (some padding is assigned and layout gap to make the controls easier to see). Both the justify and layoutItems property have been left as standard, LayoutJustifyContent.Start and LayoutAlignItems.Start. For both the controls the Align In Container property is set by the container. Both controls within edit mode are set to 200 Width and 30 height (hard coded). The text shows this. However, as you can see, once published the button and label revert to their default settings (as if they were placed fresh on the screen). I have no clue how this bug is occurring, I have tried to revert back to old studio versions to see if that would fix the issue however that brings up different errors (as the studio versions must also be broken...). 

    One thing worth noting is that if a regular container is used as opposed to a horizontal/vertical container, the controls within the regular container persist their settings. However this is next to useless for me as I would still need to do the layout manually.

    It is worth noting I am on studio version 3.24031.25. 

    PlayModeBug.png
    PowerAppsButton.png
    PowerAppsComponentBug.png
  • Verified answer
    HK-786 Profile Picture
    11 on at

    I have figured it out. The new analysis engine was enabled. Once disabled, the components work correctly again, I did not realise it was enabled. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 337 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 250

#3
Mohsin Ali Profile Picture

Mohsin Ali 225

Last 30 days Overall leaderboard