2

I'm building html mail, in which I have a checkbox:

#table1 {display: block}
input:checked ~ #table1 {display: none}
<input id="checkbox" class="toggle" type="checkbox">
<table id="table1" style="width: 100%; border: 0; padding: 0; text-align: center; position: fixed; bottom: 0" cellpadding="9" cellspacing="0"> 
  <td style="font-size: 9px; font-family: Verdana; color:#898a8c">hide me</td>
</table>

If I open it in my web browser, it works fine, but, if I send it as a html email (I'm working with outlook), nothing happens on checkbox checked. I know there is no way to use JavaScript in mail (it would be a security issue), but, can I make it works using only CSS?

Jason Aller
  • 3,541
  • 28
  • 38
  • 38
  • 1
    Possible duplicate of [Is it possible to collapse/expand a DIV within an email? What clients support this?](https://stackoverflow.com/questions/7635219/is-it-possible-to-collapse-expand-a-div-within-an-email-what-clients-support-th) – Jim G. Jul 30 '19 at 20:51
  • 1
    Email HTML is restricted. You should check [this](https://litmus.com/community/discussions/191-style-display-none-not-working-in-gmail-and-outlook-2013#comment-742). – spartanz51 Jun 21 '18 at 08:43

0 Answers0