I'm writing a HTML/CSS email template to be triggered for Gmail and other mails. However, Gmail does not load the <style>
blocks, so I have to use inline 'style' attribute to make it work.
To illustrate the problem:
<style>
.center {
text-align:center;
}
</style>
<a class="center"> text </a>
Transform to:
<a class="center" style="text-align:center;"> text </a>
Does anyone here know a better way or any program for doing it?
There is a web app which is designed for the job.
Converts CSS rules into inline style attributes
https://inlinestyler.torchbox.com/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With