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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Style for multiple HTM...
Power Automate
Unanswered

Style for multiple HTML Tables for email

(0) ShareShare
ReportReport
Posted on by

Hi,

 

I have an email that has multiple different HTML tables in.

I have the following style added to each of them (copied from an online tutorial and edited to be what i would like)...

But, I tried to adapte without success,

 

I trie to have all tables (max 4) with the same style,

Each table has 5 columns

First column has to be larger than the other 4 (for all tables)

The second bit more larger than the Third one.

The fourth and fith equals,

So I want to adapt myself and fixed for larger

 

I tried many proposition but each time without success,

Could you help me on this ?

 

My code just below :

 

<style>
table {
border: 1px solid #000000;
background-color: #Ffffff;
width: 100%;
text-align: centre;
border-collapse: collapse;
}
table td, table th {
border: 1px solid #000000;
padding: 1px;
text-align: centre;
}
table tbody td {
font-size: 15px;
}
table thead {
background: purple;
border-bottom: 1px solid #000000;
}
table thead th {
font-size: 15px;
font-weight: bold;
color: #Ffffff;
border-left: 1px solid #000000;
}
table thead th:first-child {
border-left: none;
}
</style>

 

 

Regards

Categories:
I have the same question (0)
  • Verified answer
    v-wenjuan-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    Please try this:

    You can change proportion of each column to adjust their width.

     

    <!DOCTYPE html>
    <html>
    <style>
    table, th, td {
     border:1px solid black;
     border-collapse: collapse;
    }
    </style>
    <body>
    
    <h2>Set columns to fixed proportion of the table width</h2>
    
    <table style="width:100%">
     <tr>
     <th style="width:30%">Firstname</th>
     <th style="width:25%">Lastname</th> 
     <th style="width:23%">Age</th>
     <th style="width:11%">Gender</th>
     <th style="width:11%">Region</th>
     </tr>
     <tr>
     <td>Jill</td>
     <td>Smith</td>
     <td>50</td>
     <td>1</td>
     <td>2</td>
     </tr>
     <tr>
     <td>Eve</td>
     <td>Jackson</td>
     <td>94</td>
     <td>1</td>
     <td>2</td>
     </tr>
     <tr>
     <td>John</td>
     <td>Doe</td>
     <td>80</td>
     <td>1</td>
     <td>2</td>
     </tr>
    </table>
    
    </body>
    </html>

     

     

    It will display like this:

    vwenjuanmsft_0-1681883015039.png

     

    Here's a useful tool for your reference:

    W3Schools Tryit Editor

    HTML Table Sizes (w3schools.com)

     

    Community Support Team _ Wenjuan Zou

    If this post helps, then please consider Accept it as the solution to help the other members find it.

     

  • Community Power Platform Member Profile Picture
    on at

    Hi @v-wenjuan-msft,

     

    Sorry but it's not working because i forgot to explain that I have an select action with HTML Table and the style is include in "Compose Step"

    In my situation I have several HTML Table with many differents rows,

    The Compose step is applied to all my HTML table

     

    I just want to include in my "Compose" step, the possibility to adjust my column width, that will impact all my HTML Table as well all the rows

     

    JL7_0-1681893644979.png

     

    Do you need more information ?

    Thanks a lot for your proposal and your help 🙂

     

    Regards

     

  • Verified answer
    v-wenjuan-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    Content in your compose will not make impact on any of your HTML table built above as you don't refer them into the compose.

     

    I make a demo based on my above solution for your reference:

    vwenjuanmsft_0-1681962323208.pngvwenjuanmsft_1-1681962448035.png

     

    and here is my result displayed in email:

    vwenjuanmsft_2-1681962489655.png

     

    Hope this helps.

    Community Support Team _ Wenjuan Zou

    If this post helps, then please consider Accept it as the solution to help the other members find it.

     

     

     

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 Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard