This is a re-post from Powershell expert “Ben Wilkinson“, the original ps function is here. I did have some trouble in making it work in my own script and found that I have to add opening and closing “style” tags in the css definition part to make it work. So here I am writing a memo about this:
[code language=”css”]
if (!$CSS)
{
# Please use the download link to get the CSS it may not display correctly here.
$CSS = @"
<style>
table {
font-family: Verdana;
border-style: dashed;
border-width: 1px;
border-color: #FF6600;
padding: 5px;
background-color: #FFFFCC;
table-layout: auto;
text-align: center;
font-size: 8pt;
}
table th {
border-bottom-style: solid;
border-bottom-width: 1px;
font: bold
}
table td {
border-top-style: solid;
border-top-width: 1px;
}
.style1 {
font-family: Courier New, Courier, monospace;
font-weight:bold;
font-size:small;
}
</style>
"@
}#End if
[/code]
Leave a Reply