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

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / how to stop auto fit t...
Power Automate
Unanswered

how to stop auto fit table to email window size

(0) ShareShare
ReportReport
Posted on by

Hi everyone,

I am frustrated by this problem. So when I manually insert a table in outlook and sent it. And if the column content is too long(like the forth column in the image below) it exceed the size of email window. it will just provide me with a horizontal scroll bar and maintain the original table size and layout. 

wangm31_1-1660145650042.png

 

And that's what I want. But now when I using flow and the select-compose action to insert table in to the email, the table is always auto fitted to the email window size. It means when my table is bigger than email window width, instead of maintain the table structure and give me a scroll bar, it squeezes the column width and make each cell much longer in height. This makes it look like below image. The structure of the 4th column is completely destroyed. 

wangm31_2-1660145831322.png

 

Below is my compose action code for the table format. I didn't find anything there suggest that I tagged on auto fitting. Help please, help. how can I make that table behaviors like the table we can manually created in outlook.

 

 

 

<style>
table {
 border: 1px solid #1C6EA4;
 text-align: left;
 border-collapse: collapse;
}
table td, table th {
 border: 1px solid #AAAAAA;
 padding: 3px 2px;
}
table tbody td {
 font-size: 11px;
}
table thead {
 background: #1C6EA4;
 border-bottom: 2px solid #444444;
}
table thead th {
 font-size: 11px;
 font-weight: bold;
 color: #FFFFFF;
 border-left: 2px solid #D0E4F5;
}
table thead th:first-child {
 border-left: none;
}
</style>

 

 

 

  

Categories:
I have the same question (0)
  • FanaticBI Profile Picture
    4 on at

    mostly it seems as stylesheets ignored . I used max-width direct on the table. But at least its not possible extend the table "endless" somewhere is a cap. I'm still struggle with it to display my data correctly.

    <table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=\"4000\" style=\"max-width:4900pt;margin-left:.4pt;border-collapse:collapse\">"}]}

  • David_MA Profile Picture
    13,454 Super User 2026 Season 1 on at

    You are correct, most e-mail clients ignore style sheets. You need to use inline styling to get what you want. Such as:

    <table width="800" border="1">
    <tr style="background-color: yellow; font-weight: bold;">
    <th>Company</th>
    <th>Contact</th>
    <th>Country</th>
    </tr>
    <tr>
    <td>Alfreds Andersen</td>
    <td>Maria Anders</td>
    <td>Germany</td>
    </tr>
    <tr>
    <td>Centro comercial Moctezuma</td>
    <td>Francisco Chang</td>
    <td>Mexico</td>
    </tr>
    </table>

     

  • FanaticBI Profile Picture
    4 on at

    I'm still using inline styling with width and max-width , and elements which should fix something for outlook. But at least the table is not going bigger nor I'm getting a scrollbar on a spicific point. My tables are filled by dynamic content and its re-sizing into a unreadable way.

  • David_MA Profile Picture
    13,454 Super User 2026 Season 1 on at

    Specify the width of the table, and then for your first row specify the td widths in percentages.

    <style>
    Table {
     font-family: Arial, Helvetica, sans-serif; background-color: ; #EDF0F2; border-collapse: collapse;
     width: 100%; max-width: 820px; }
    Table td, Table th { border: 1px solid #ddd; padding: 3px 3px; 
    Table th { font-size: 15px; font-weight: bold; padding-top: 12px; padding-bottom: 12px; text-align: left;
     background-color: #0038A6; color: white; }
    </style>
    <table>
    <tr>
    <td width="30%">Request #</td>
    <td width="70%">@{outputs('Get_item')?['body/Title']}</td>
    </tr>
    <tr>
    <td>Company</td>
    <td>@{outputs('Get_item')?['body/Company_x0020_Name']}</td>
    </tr>
    <tr>
    <td>SAP Code</td>
    <td>@{outputs('Get_item')?['body/SAPCode']}</td>
    </tr>
    <tr>
    <td>MGM Code</td>
    <td>@{outputs('Get_item')?['body/MGM']}</td>
    </tr>
    <p>Please do not reply to this e-mail message. It was generated by an automated workflow and you will not receive a response.</p>

    This has worked from my experience.

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 Automate

#1
trice602 Profile Picture

trice602 239 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 177 Super User 2026 Season 1

#3
Kalathiya Profile Picture

Kalathiya 97 Super User 2026 Season 1

Last 30 days Overall leaderboard