Is it possible to use external CSS on Email Template? For example: Bootstrap framework

Akkapolk
Giga Expert

System Policy -> Email -> Templates -> change.itil.approve.role

find_real_file.png

 

Example: Bootstrap code and output.

<!DOCTYPE html>
<html lang="en">
<head>
  <title>Bootstrap</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
  <div class="row">
    <div class="col-sm-4">
      <h3>Column 1</h3>
    </div>
    <div class="col-sm-4">
      <h3>Column 2</h3>
    </div>
    <div class="col-sm-4">
      <h3>Column 3</h3>        
    </div>
  </div>
</div>
</body>
</html>

Output:

find_real_file.png

 

 

1 ACCEPTED SOLUTION

Chuck Tomasi
Tera Patron

If there is, I haven't found a way. I tried this with style tags and referencing the CSS from those in each HTML tag, but even that failed. I had to revert to include style attributes on the HTML. Ouch!

What you might want to look at is using a Layout to span multiple templates. I used this on a template then the template in the notification and everything worked nice.

View solution in original post

2 REPLIES 2

Chuck Tomasi
Tera Patron

If there is, I haven't found a way. I tried this with style tags and referencing the CSS from those in each HTML tag, but even that failed. I had to revert to include style attributes on the HTML. Ouch!

What you might want to look at is using a Layout to span multiple templates. I used this on a template then the template in the notification and everything worked nice.

Thank you very much.