This articleArticleFor web mailCSSProblems and Solutions
1.For webpage emails, if you want to addCSSPlease use an internal style sheet, because for most websites, external style sheets are vulnerable to screen display by default, although you can browse beautiful web pages locally, however, you can only view the content in the email, but the style does not exist.
2. when you create and apply an internal style sheet, go to use --> to end it. Otherwise, CSS cannot be displayed in the email. The reason is unknown, but almost all email providers have tested this (except for Gmail , therefore, it is best not to send any CSS marked webpage emails, because it is impossible to predict and control how your emails are displayed in your mailbox. Unless you want to HTML after marking it, write style Attributes -- if you do, congratulations, you have succeeded, but you may be exhausted, and I cannot write a DLL to help you ).
3. you will be able to body declare background attribute in style, however, the font attribute cannot be declared, if you want to define the font , go to body Directly declare a id as container (main) attribute in the container. This is because when your webpage is displayed in an email, you must follow the rules of the email service provider, there is already a body container in its webpage, so the display will be faulty. We can only do this kind of back-to-second right approach.
4.Use with cautionFloatAndClearAttribute, because you cannot know how much space your email service provider provides for the mail body to display your webpage. This wayFloatIt makes the arrangement of block elements unpredictable. If you have mastered the float, you don't have to consider it.
5.You can define the width and height of each block element, but you should be cautious when defining the width, because you cannot know what the user's screen resolution is, of course, no one will use it now800*600But your width should not exceed800(This also applies to otherCSSCodeCompiling ).
6. it is best to notify your users, do not open your webpage in a new window. The command to open an email in a new window is implemented using a JavaScript statement, it only returns innerhtml field. Because of this, in defined in "> will not be inherited, in this way, you will not see any CSS style, including very important background-image . (To be noted, my 163vip email can be displayed Normally when a new window is opened, I don't know how it works.)
7.Make sure yourCSSThere is no problem with the code, because the browser has a very strong ability to correct errors, and you may have some small sizes that are unknown on the local page.BugBut when you send it to your mailboxBugIt will be apparent, so you 'd better perform some rigorous tests before sending them to users.