I have a lot of webpages I produce using PowerShell. It would be great to make them all nice and fluffy with some CSS. If I use internal CSS all is good. It would save time and space if there was a central CSS I could use but testing the external style sheet I get no style output at all.
$Style = "<style>
<link rel = 'stylesheet'
type = 'text/css'
href = 'myStyle.css' />
</style>
<h2>hello</h2>
<p>hello</p>
"
ConvertTo-Html -Title "Hello" -Body $Style | Out-File test.htm
My style sheet contains
h2 {
color: #FFFF33;
text-align: center;
font: italic 200% fantasy;
}
p {
color: red;
text-align: center;
font: italic 200% fantasy;
}
Is it possible to use external style sheets with the ConverTo-Html
cmdlet?