What to do if the email does not support css

藏色散人
Release: 2023-01-04 09:38:23
Original
2402 people have browsed it

The email does not support css due to the use of internal styles and external styles. The solution is to use inline styles in the email. Because the main part of the email is inside the body, the style must be written inline. , style cannot be written in the head tag, nor can it be externally linked.

What to do if the email does not support css

#The operating environment of this tutorial: Dell G3 computer, Windows 7 system, css3 version.

Recommendation: "css video tutorial"

Doesn’t email support css?

Email supports CSS, but inline styles need to be used, internal styles and external styles cannot be used.

The following are some notes on using css in emails:

1. The email uses table css layout

2. The main part of the email is inside the body, so the style must be If it is written inline, style cannot be written in the head tag, nor can it be externally linked.

3. You cannot use floating positioning. position: absolute; float: left; etc. will not work. Float can be recognized in the QQ mailbox client, but cannot be recognized in Outlook.

4. For the border of the table, use the border attribute on the table, which is compatible with the QQ browser, but there is no border when opened in Outlook. In this case, we can only add a border to each td. A border, use border-collapse:collapse; in the table to merge repeated borders.

5. In order to ensure compatibility, you need to set the width of the email to 600px, with a maximum of 600px;

6. Use img sparingly, because many email clients do not display images by default, so if If you need a picture, be sure to write alt and title;

7. For background pictures, try to use background-color and use a solid color background. If you must use a background picture, use the background attribute,

8 .Email does not support javascript, flash and some special tags.

Since email clients have different CSS support, you must test more before sending to ensure the correct style. If incompatibility occurs, you must be patient and use the simplest method for compatibility, and try to use as few special tags and more complex attributes as possible.

The above is the detailed content of What to do if the email does not support css. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template