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 / Formatting html table ...
Power Apps
Unanswered

Formatting html table -> force the column width

(0) ShareShare
ReportReport
Posted on by 10

I am facing an issue that when the value of the cell is too long, it will automatic make my column width wider, and the last column's value will disappear.

but i want to fix the column width , if the word is too long, it woll automatically turn to new line, so the format can be more neat.
Below is my html code and picture of the result.

"<table width=""300"" cellspacing=""0"" cellpadding=""0"">
<tr>
<td width=""50""><b>Name </b></td>
<td width=""50"">123456789</td>
<td width=""50""><b>BrandID: </b></td>
<td width=""50"">123456789</td>
<td width=""50""><b>WorkdayID: </b></td>
<td width=""50"">jjjjjjjjjjjjjjjjjjj</td>
</tr>
<tr>
<td colspan=""1"">&nbsp;</td>
</tr>
<tr>
<td ><b>FormID: </b></td>
<td >tttttttttttttttttt</td>
<td ><b>FlowID: </b></td>
<td >ddddddddddddddddddddddddddddddddddddddddddd</td>
<td ><b>Title:</b></td>
<td>gggggggggggggggggggggggggggggg</td>
</tr>


</table>
</form>
"

 

Vivian_Liu__0-1684379962915.png

what i want :

Vivian_Liu__1-1684380238533.png

 

Categories:
I have the same question (0)
  • Tony_Bowes_BP Profile Picture
    280 on at

    HTML table width and height are only minimums, not fixed. A table will expand to allow data to fit or to take up more space that hasn't been explicitly allocated. 

     

    There are a couple of ways to limit the text inside the data elements to abide by the dimensions imposed

    A) Use CSS Style Overflow and Text overflow.  CSS Overflow (w3schools.com)

    B) Use Display:Inline-block to allow word wrapping

    C) Use Table-layout:fixed to only focus on the top row of widths 

     

    Here's a starter:

    table th,td {
     width: 15%;
     height: 50px;
     display: inline-block;
     overflow:hidden;
    }

     

    You might want to try with W3school's inline editor to get the proper outcome you want: W3Schools Tryit Editor

    Remember to try with multiple screen resolutions and browser widths too. 

  • Vivian_Liu_ Profile Picture
    10 on at

    I thought that powerapps can't write css, but only inline css?

     

  • Tony_Bowes_BP Profile Picture
    280 on at

    Hmm, I was assuming you were outputting the HTML to a report or email or something. If you're attempting to use HTML to manually build out a form inside a canvas app you're in for a world of hurt as you'll be fighting against the responsive design, the auto-scaling, etc, and missing out on most of the useful features that the WYSIWYG interface is trying to do for you. 

    Is there something stopping you from just using labels and read-only textboxes to quickly knock up a form or screen with the same look & feel?

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 493 Most Valuable Professional

#2
11manish Profile Picture

11manish 479

#3
Haque Profile Picture

Haque 328

Last 30 days Overall leaderboard