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 layout for ...
Power Apps
Answered

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:
  • Verified answer
    Garima_PowerPlatform Profile Picture
    170 on at
    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
    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

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 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard