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 Automate
Answered

Html formatting help

(0) ShareShare
ReportReport
Posted on by 10

my output of the html table in a email is like the below

Pradeepm93_0-1667315892141.png

 

but i want it to be shown as below

 

Pradeepm93_1-1667315958418.png

 

 

Below is the table compose i used. Please help what i have to change

 

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

 

Categories:
I have the same question (0)
  • Ajinder31 Profile Picture
    530 on at

    Hi @Pradeepm93, may we know what problem you're facing in achieving the expected output. The expected output seems not to contain the column headers. Are you facing issue with removing column headers or with css styling?

  • Pradeepm93 Profile Picture
    10 on at

    Sorry about the poor screenshot. Below is my expected output of the html table in the email body

     

    Pradeepm93_0-1667317383717.png

     

     

    So i think i need help with the css styling. 

  • Ajinder31 Profile Picture
    530 on at

    Hi @Pradeepm93, please try the below styling 

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

  • Pradeepm93 Profile Picture
    10 on at

    My output has become like this

    Pradeepm93_0-1667318816997.png

     

     

    I am trying to not wrap the text in the cell and display is a single line in my html generated table, ex like the below image. What and where do i put the nowrap code line in the code i have given as input.

     

    Like this i want 

    Pradeepm93_1-1667318920648.png

     

  • Ajinder31 Profile Picture
    530 on at

    Hi @Pradeepm93, try adding styles to below to section to update the no-wrap. I think adding width: 100% might but haven't tried it yet.

    table tbody td {
    font-size: 13px;
    width: 100%;
    }

  • Verified answer
    David_MA Profile Picture
    12,970 Super User 2025 Season 2 on at

    The following CSS should give you what you are looking for:

    <style>
    Table {
     font-family: Arial, Helvetica, sans-serif;
     background-color: ; #ffffff;
     border-collapse: collapse;
     width: 100%;
    }
    Table td, Table th {
     border: 1px solid #000000;
     padding: 3px 3px;
    }
    Table th {
     font-size: 15px;
     font-weight: bold;
     padding-top: 12px;
     padding-bottom: 12px;
     text-align: center;
     background-color: #bad8f2;
     color: #000000;
    }
    </style>

     

    It produces this for me:

    Capture.png

    I used PhotoShop to get the background color for the table header. If you know your specific HEX color for the blue, replace it in the background-color: #bad8f2; under Table th in the styles.

     

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

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard