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 / CSS styling for HTM ta...
Power Automate
Unanswered

CSS styling for HTM table doesn't work

(1) ShareShare
ReportReport
Posted on by 2

Hi All,

 

I have an issue with the output of an HTML table in a Mail.

The basis of the table is the body of an filter array with custom columns, code looks like this.

pl25_0-1668088303176.png

 

The CSS in the compose step looks like this:

 

<style>

table {
 border-collapse: collapse;
 width: 100%
}
th, td {
 border: 1px solid black;
 text-align: center;
}

</style>

 

Iv'e put the compose before the HTML table in the mailing step.

pl25_1-1668088501211.png

 

But the table still comes out looking like a normal HTML table.

pl25_2-1668088577460.png

 

I've also tried to put the HTML output directly into the Compose step as well as writing the CSS code in the mail step, but the output of the table always looks like shown in the image above.

Does anybode have any idea why the styling doesn't work in this case?

Thanks in advance!

 

Categories:
I have the same question (0)
  • VictorIvanidze Profile Picture
    13,073 on at

    Try to use inline styles instead of style block.

  • RobElliott Profile Picture
    10,323 Super User 2025 Season 2 on at

    I assume you mean that you're not getting any borders. In case it helps, this is the css inside the compose action that I use for one of our emails:

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

     

    The result of that is:

    0-Email.png

     

    And the flow looks like this.

    1-Flow.png

     

    2a-Flow.png

     

    2b-Flow.png

     

    3-SendEmail.png

     

    Rob
    Los Gallardos
    If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

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 523 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard