This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Can't get CSS styles to work

Working on changing over some of our text based email alerts to HTML.

HTML styles work find if I embed them directly in the <td> element of a table.

However, I cannot get anything to work if I try to define a style.  Here's a simple example.  Just trying to get a powder-blue background on my test alert.  code follows:

<!DOCTYPE html>
<html>
<head>
<style>
body {background-color: powderblue;}
</style>
</head>
<body>
<table style="border: 5px solid #FF7D7D; width: 1080px; border-collapse: collapse; font-family: Verdana; font-size: 12pt;">
<tr><th colspan="2" style="border-bottom: 3px solid #FF7D7D;padding-bottom: 20px;background-color: #FAFAD2">Low Disk Space Alert</th></tr>
<tr><td>Server Name:</td><td style="background-color: #FAFAD2; width: 25%;text-align: justify;padding: 3px">${N=SwisEntity;M=Node.Caption}</td></tr>
<tr><td>Full Volume Name</td><td>${FullName}</td></tr>
</table>
</body>
</html>

If I save the file and display in Edge it renders as expected:

However, when I add that code to the Message section of an Orion alert, the alert displays the 'text' of the style, but does not add the background, like this:

I'm using Outlook 2016 email client.

I can make the HTML work by including style information in-line, but it is labor-intensive.  Any guidance on how I might be able to get style sheets working would be appreciated.  Thanks.

Parents Reply
  • I removed the line breaks from my code (in Notepad++).  After removing the line breaks HTML works as expected.

    Yeah, the carriage return replacement is a pain.  Pretty much eliminates the ability to use style sheets for alerts.  Inline style directives work fine but, as stated above, pretty labor intensive.

    Hopefully they can implement the suggested option to remove end of line replacement in HTML alerts.

    Thanks to all for your assistance.

Children