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 / Responsive Design: Con...
Power Apps
Unanswered

Responsive Design: Controls changing height/width?

(0) ShareShare
ReportReport
Posted on by 48

I'm trying to build a responsive layout using containers. 

 

I have a control (in this case, a Text Label) inside a Container. The Container's Orientation is set to "If(App.Width < 768, LayoutDirection.Vertical,LayoutDirection.Horizontal)" 

 

If I resize the browser viewport (App.Width) from above to below 768px, then the height of the Text Label  will change from what I set it to (40) to 150. In the designer, the value still shows as 40, however....

 

So, the height of the element is changing if I resize the viewport... Is this expected behavior? Why does it do that?

Categories:
I have the same question (0)
  • Tolu_Victor Profile Picture
    197 Super User 2024 Season 1 on at

    Hi @oguruma ,

    It seems you are using a container incorrectly. You need not set the orientation dynamically.

    Just leave it on Horizontal then set the "Wrap" to true. This means that if an item cant fit the current row. It should go to next row.

    The last thing you need to do is to make use of the Minimum Width property of its child items.
    For example. you have a container and you want to display 2 Labels, you want them stacked side by side if the available width on the current row is 700px or more (350 min-width for each).
    If the current viewport is >=700px, they stack side by side since a min of 350 for each can fit. But if the viewport drops to 699px, there is enough space for only one. 350 cant fit in 349 so it would "Wrap" to the next line, hereby creating a vertical display.

    In summary, you need not dynamically set Orientation but set "Wrap" to true and focus on the actual child elements dynamically or statically setting its Min-Width and fill-portions

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 413

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
timl Profile Picture

timl 315 Super User 2026 Season 1

Last 30 days Overall leaderboard