Is there an equivalent of CSS max-width that works in HTML emails?

后端 未结 5 1269
梦如初夏
梦如初夏 2020-12-07 08:12

I\'m trying to create an HTML email that will display properly in all widely used email clients. I\'m wrapping the whole email in a table, and I\'d like it to have a width

5条回答
  •  广开言路
    2020-12-07 08:49

    Bit late to the party, but this will get it done. I left the example at 600, as that is what most people will use:

    Similar to Shay's example except this also includes max-width to work on the rest of the clients that do have support, as well as a second method to prevent the expansion (media query) which is needed for Outlook '11.

    In the head:

      
    

    In the body:

    
    
    main content here

    Here is another example of this in use: Responsive order confirmation emails for mobile devices?

提交回复
热议问题