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

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Responsive layout for ...
Power Apps
Unanswered

Responsive layout for PCF component

(0) ShareShare
ReportReport
Posted on by 52
Hi
I have PCF component. The Component layout works fine when i preview it but in Play mode the scroll gets activated. 
It is a table and I set the width to 100%, I also set the column width to fixed 5%,45% ratio. But whatever we do the scroll is enabled in the fullscreen playmode. Is there a way we can get the table to display within the layout without enabling the scroll.? 
 
'<table id="ABC" border="1"><tr><th data-f-bold="true" class = "Line1">Line Number</th>
<th data-f-bold="true" class= "File1">File 1</th><th data-f-bold="true" class="Line1">Line Number</th>
<th data-f-bold="true" class="File1">File 2</th></tr><tbody>';
 
I have set the App Settings as follows:
 
The css file was defined as below.
Categories:
I have the same question (0)
  • Verified answer
    Garima_PowerPlatform Profile Picture
    170 on at
    Responsive layout for PCF component
    Hi,

    Table’s width is explicitly set to fit within the parent container.

    #ABC {
        width: 100%;
        table-layout: fixed;
        border-collapse: collapse;
    }

    Define the column widths explicitly and proportionally using percentages
    .Line1 {
        width: 5%;
        word-wrap: break-word; /* Prevents content overflow */
    }
    .File1 {
        width: 45%;
        word-wrap: break-word; /* Prevents content overflow */
    }


    Check the parent container’s width and height in Play mode to ensure it adjusts dynamically to the screen size:
    .parent-container {
        width: 100%;
        height: auto;
        overflow: hidden; /* Prevents scrollbars */
        display: flex; /* Optional: Ensures flexible layout */
    }

     
  • CU10090150-0 Profile Picture
    52 on at
    Responsive layout for PCF component
    Explicitly defining the table's width definitely solved the problem. Thanks Much for the help @Garima_PowerPlatform

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 836 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 231 Super User 2025 Season 2

Last 30 days Overall leaderboard