display:none doesn't work on Outlook 2007

后端 未结 12 1738
鱼传尺愫
鱼传尺愫 2020-12-15 23:24

I want to send an e-mail from our system to customers, where some tags should be hidden to them. I\'ve set the following CSS:

.hidden { display: none; }
         


        
12条回答
  •  庸人自扰
    2020-12-15 23:55

    I did some quick testing, and found that Outlook (2000, 2003, 2007, 2010, 2013 and Outlook.com) supported several variations of display: none; as expected. On the other hand, Gmail in the browser and on Android failed miserably.

    I tested the following:

    01 02 03 04 05 06

    CSS inline, in the HEAD and in the BODY

    Where there are IDs, I tested the follow CSS in the HEAD of one email and in the BODY of another email.

    
    

    RESULTS: CSS Inline and in the BODY

    1. Outlook (all) passed; Outlook.com Android failed, Gmail (all) failed
    2. Outlook (all) passed; Gmail (all) failed
    3. Outlook (all) passed; Gmail (all) failed
    4. Outlook (all) passed; Gmail (all) failed
    5. Outlook 2007, 2010 & 2013 failed; Gmail (all) failed
    6. Outlook (all) passed; Gmail (all) failed

    Outlook (all) = 2000, 2003, 2007, 2010, 2013, Android Outlook, Outlook.com (IE, Fx, Chrome)

    Gmail (all) = Gmail in IE, Fx, Chrome and in Android

    RESULTS: CSS Inline and in the HEAD

    1. Outlook (all) passed; Outlook.com Android failed; Gmail (all) failed
    2. Outlook (all) passed; Outlook.com Android failed; Gmail (all) failed
    3. Outlook (all) passed; Outlook.com Android failed; Gmail (all) failed
    4. Outlook (all) passed; Outlook.com Android failed; Gmail (all) failed
    5. Outlook 2007, 2010 & 2013 failed; Outlook.com Android failed; Gmail (all) failed
    6. Outlook (all) passed; Outlook.com Android failed; Gmail (all) failed

    LONG STORY SHORT

    Outlook 2000+ supports display: none; fairly well. Gmail does not. It became difficult to discern what was failing or working in Gmail due to how much it failed. The screens even became cropped in certain situations.

    I'll retest later and post screenshots if I can — right now my testing set up is taking too long to save out screen shots of each scenario and reader.

提交回复
热议问题