-1

I am writing an HTML template with CSS for an email. The stylesheet is on our server in AWS and is linked inline.

What is the solution to linking the CSS stylesheet so it displays correctly. when emails are sent. how it looks on sendgrid how it looks on gmail

I tried to upload the css file to our aws server and link it It didn't work, that's how it shows up in gmail

enter image description here

1 Answers1

0

The best way to add styles to html emails is applying them inline. But if you have not done it this way yet then you can simply copy all the CSS codes from the external stylesheet and paste them into the html as "Internal CSS" and then go online and search for "CSS inliner" and copy paste the html (containing internal CSS) and it will return an html with inline CSS.

But remember it is just a way to convert your external CSS into inline CSS. But if you have not written your codes as email friendly with table-based approach then you will still have issues.

You can also check the CSS rules that you can use for emails from caniemail.com and also check the validity of your codes from validator.w3.org/

Md. Rakibul Islam
  • 2,140
  • 1
  • 7
  • 14