hteumeuleu / caniemail

Can I email… Support tables for HTML and CSS in emails.
https://www.caniemail.com
MIT License
818 stars 70 forks source link

<style> element not supported in new Outlook #440

Closed jan-tosovsky-cz closed 2 months ago

jan-tosovsky-cz commented 4 months ago

https://www.caniemail.com/features/html-style/

The following HTML content was formatted properly in Outlook and GMail. However, in the new Outlook, the <style> element seems to be completely ignored as that table is displayed without any styling. Even wrapping the <style> element into the <head> doesn't help here.

<style>
  table, th, td {border: 1px solid black; border-collapse: collapse;}
  th, td {padding: 5px 10px;}
  .ok {background-color:green;}
  .warning {background-color: orange;}
  .error {background-color: red}
</style>
<table>
  <thead>
    <tr>
      <th>#</th>
      <th>Result</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>1</td>
      <td class='ok'></td>
    </tr>
    <tr>
      <td>2</td>
      <td class='warning'></td>
    </tr>
  </tbody>
</table>
hteumeuleu commented 2 months ago

Hi there. Could you give more details? I can not reproduce this in Outlook on Windows version 1.2024.313.100.

Screenshot showing Outlook number version

Screenshot showing the email displaying properly