We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 45617
    • 24 Posts
    Hello everyone,

    I've got a huge table in my email template chunk, decades of TD a so many of TR. Ready to use css to get proper shape for my form but how can i use classes inside this chunk? - <table class="myform"> doestn't work. I guess the chunk doesn't know where is the css with .myform ?

    <table class="myform">
    <tbody>
    <tr>
    <td colspan="2">logo</td>
    <td colspan="10">title</td>
    <td colspan="2">www</td>
    </tr>
    <tr>
    <td colspan="14">name</td>
    </tr>
    </tbody>
    </table>


    Thank you a lot, a lot.

    Peter
    • This has nothing to do with FormIt or MODX at all, it has to do with how email handles HTML formatted messages. Email clients aren't WWW browsers, and they behave quite differently. The chunk tpl is exactly what gets sent as the entire email message. As mentioned in the posts linked below, mail servers usually won't allow linked files the way a web browser does (other than images), so an external .css file usually won't work.

      http://stackoverflow.com/questions/2105963/can-you-link-to-a-css-file-from-an-email
      http://www.sitepoint.com/code-html-email-newsletters/
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 45617
        • 24 Posts
        OK, I have. I have forgotten having an external css file. I understood.
        If the solution is inline style="..." attribute on every damn element, I will.

        Thank you Susan for answer, you spared me a lot of time.