HTML email link color dilemma

后端 未结 13 1049
失恋的感觉
失恋的感觉 2020-12-15 04:35

I designed an HTML email and I am having the following issues: First my entire design is based on a blue color so any blue text will not be readable by the reader/user, text

13条回答
  •  执念已碎
    2020-12-15 05:15

    When sending html emails the best practice is to stick to old HTML3 and HTML4. Email clients do not play well with CSS2 and up. Inline CSS work much better.

    Instead of:

    
     1800-000-0000
     
    

    By the way, you have syntax errors in this line, after each css declaration you need a ;

    Corrected:

    
      1800-000-0000
     
    

    Try this:

    
      1800-000-0000
    
    

    Do not forget to specify the HTML version on the DOCTYPE.

    I've found myself working in both sides of this situation. I worked on a web based email client using PHP with IMAP, I had to strip HTML emails of a lot of things because they'd break not only the layout of the app but also the intended behavior of buttons and forms. How? you might ask. With a desktop email client this probably wouldn't be a problem but with a web based email client loading external css/js files can result into a very large array of potential pitfalls and nasty bugs.

    On another occasion I was working on wedding invitations sent over HTMl emails, The amount of inline css we had to do was ridiculous. To make it work on you have to use mostly HTML3 and maybe a bit of HTML4 but not too much.

    I recommend you to experiment with tables and deprecated HTML3 inline css.


提交回复
热议问题