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 Automate / Correction in HTML Tab...
Power Automate
Answered

Correction in HTML Table Column formatting

(0) ShareShare
ReportReport
Posted on by 2

I am using the below code in my style compose code to make first column data of the HTML table and it is working fine, it brings the correct formatting in my email.

 

#table2 td:first-child {
text-align: right;
}

 

But when I try the below to apply for the 3rd column, it has no error and no impact of code, it remains as it is - no changes can be seen for the column:

 

#table2 td:nth-child(3)
{
text-align: right;
}

 

Is there is other way to write to impact the third row data.

 

Please advise

 

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,912 Most Valuable Professional on at

    Hi @MIA27,

     

    Yes, as far as I am aware the nth:child selector is ignored in Outlook.

     

    Have a look at this article/blog from Ryan Maclean:

    https://ryanmaclean365.com/2020/01/29/power-automate-html-table-styling/

     

    He demonstrates in the advanced styling part of that blog how you can build your own custom table with advanced styling. By using that approach instead of the create HTML table you should be able to style the 3rd column.

  • MIA27 Profile Picture
    2 on at

    As I am not very good in html coding, the website has many steps which I need learn.

     

    at least padding is not possible for the a particular column.

    No other workaround?.

     

    If possible please guide

     

  • MIA27 Profile Picture
    2 on at

    I found some discussion on the this issue

    https://stackoverflow.com/questions/73612377/alternatives-to-css-n-th-child-selector-in-html-table-for-outlook 

     

     

    But could not understand how to apply the below in my situation

    table.table2 tr td + td + td + td +td {
     text-align: right;
    }

     

    Is it possible, to arrange a workaround.

     

    Please guide

     

  • Verified answer
    Expiscornovus Profile Picture
    33,912 Most Valuable Professional on at

    Hi @MIA27,


    Below is an example for the third column.

     

    In this case I have set the background colour to red.

     

    <style>
    table td + td + td {
     background-color: #ff0000;
    }
    table td + td + td + td {
     background-color: #ffffff;
    }
    </style>
    @{body('Create_HTML_table')}

     

    thirdcolumnbackgroundcoloursetup.png

     

    And the test result in Outlook OWA

     

    examplestyling.png

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 245

#2
David_MA Profile Picture

David_MA 216 Super User 2026 Season 1

#3
Valantis Profile Picture

Valantis 212

Last 30 days Overall leaderboard