I am using PSWriteHTML to format email. When I try New-HTMLTable, it seems the width is ignored and the table is always forced to 100% of the screen width. How do I force the size to less than the full screen width?
I tried:
$html = New-HTML {
New-HTMLPanel -Width '60%' -Content {
New-HTMLTable -DataTable $data -HideFooter -ScreenSizePercent 60 {
New-HTMLTableHeader -Names 'Filename' -FontFamily "Calibri" -FontSize 10 -Alignment Left -BackGroundColor '#2d5a8f' -Color White
New-HTMLTableHeader -Names 'LineNumber' -FontFamily "Calibri" -FontSize 10 -Alignment Center -BackGroundColor '#2d5a8f' -Color White
New-HTMLTableHeader -Names 'Line' -FontFamily "Calibri" -FontSize 10 -Alignment Left -BackGroundColor '#2d5a8f' -Color White
#New-HTMLTableHeader -BackGroundColor Grey -Color White -Title 'Summary of Printer Backup Errors'
}
}
}
Neither the New-HTMLPanel resizes the table, nor the ScreenSizePercent parameter for New-HTMLTable.
How do I set the width when the HTML table is in the body of an email (I.e. read in Outlook)? Everything else works.
Thanks
I am using PSWriteHTML to format email. When I try New-HTMLTable, it seems the width is ignored and the table is always forced to 100% of the screen width. How do I force the size to less than the full screen width?
I tried:
Neither the New-HTMLPanel resizes the table, nor the ScreenSizePercent parameter for New-HTMLTable.
How do I set the width when the HTML table is in the body of an email (I.e. read in Outlook)? Everything else works.
Thanks