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 / Headers not displaying...
Power Apps
Suggested Answer

Headers not displaying correctly when published only on Preview

(1) ShareShare
ReportReport
Posted on by 222
Hi,
I have a header container.  When I preview the app, the header container appears as per below.
But when the app is published, the header containers moves the headers and display very differently.
I have tried to set the X position of the label to match the corresponding gallery field.X, but this did not work.
I have tried to create a separated container, this did not work.
I also tried using a static value for each position, this did not work either.
I have also cleared cookies etc. , but this did not work.
Not sure what else I can try to make the headers display correctly.
 
Any assistance will be appreciated.
 
Kind regards
 
Rene Voller
Categories:
I have the same question (0)
  • Suggested answer
    11manish Profile Picture
    3,333 on at
    try below , might be helpful 
     
    To fix the alignment between a Header Container and a Gallery, follow these steps:
    • Disable "Scale to Fit"
    • This is the most common culprit for "shifting" elements.
    • Go to Settings > Display.
    • Turn OFF "Scale to Fit".
    • Turn ON "Lock aspect ratio" (optional, but helps consistency).
    • Republish the app and check again.

    Instead of setting individual X positions, link the Header labels directly to the Gallery's template columns.
    • If your Gallery has a label named lbl_Data_Price, set your Header label (lbl_Header_Price) properties as follows:
    • X: Parent.X + lbl_Data_Price.X (This ensures the header stays exactly above the data field).
    • Width: lbl_Data_Price.Width
    Check if your Header Container and your Gallery have different Padding values (Left/Right). Even if the X positions match, different padding will cause a visual shift. Set both to 0 to test.
     
  • Suggested answer
    Valantis Profile Picture
    6,735 on at
     
    The issue is Scale to fit scaling the canvas differently in Studio vs published. Fix it in this order:
     
    1. Go to Settings > Display and turn off Scale to fit, then republish and test first. This alone may fix it.
     
    2. If headers still shift, set each header label's properties to match the gallery column it sits above:
    X: Parent.X + lbl_YourGalleryColumn.X
    Width: lbl_YourGalleryColumn.Width
     
    3. If still off, check that the header container and gallery have the same padding values. Set both to 0 and test.
     

     

    Best regards,

    Valantis

     

    ✅ If this helped solve your issue, please Accept as Solution so others can find it quickly.

    ❤️ If it didn’t fully solve it but was still useful, please click “Yes” on “Was this reply helpful?” or leave a Like :).

    🏷️ For follow-ups  @Valantis.

    📝 https://valantisond365.com/

     

  • RVoller Profile Picture
    222 on at
    Scale to fit is no longer an option in latest version of Powerapps.
    I have since added a new screen and recreated the container with header and gallery.
    This seemed to work. 
    Kind regards
    Rene Voller  
  • 11manish Profile Picture
    3,333 on at
     You’re right—“Scale to fit” is not available in modern Canvas Apps (especially with responsive layouts enabled). But you can achieve the same (and better) behavior using modern responsive design techniques.
  • Valantis Profile Picture
    6,735 on at

    Hi @RVoller,

    Just wanted to check in and see if everything is working now. If you still need any help, feel free to let me know.

    Also, if the issue is resolved, it would be great if you could mark the answer as solved so others with the same question can find it easily.

     

    Thanks and have a great day!

     

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 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard