Solutions to invalid CSS styles in IE6

Source: Internet
Author: User

Today, when I made a website, I found that the page is compatible with IE7/8, Google browser, Firefox browser, and so on, but it is not compatible with IE6. I did not see it for a long time, some solutions are collected on the Internet:

1. check whether there are any Chinese comments in the Self-compiled CSS style file, as shown in figure

 
/* Here is a style comment */.CSS{Font-Size:1em;}

For example, if the style contains a moderate annotation, try to rewrite the Chinese annotation to an English annotation and append it to the end **/

 
/* Here is a style comments ***/.CSS{Font-Size:1em;}

2. If the first method does not solve your current problem, you can try the following operations:
1. Back up your style file first.

2. After backing up your CSS fileCodeCopy --- paste to notepad ---- notepad save and save as, in the pop-up save as form find encoding, because the general web page is the UTF-8 encoding format, so here you can check whether your default encoding format is UTF-8 or the same as the HTML encoding format you specified. If not, select from the drop-down list to make the encoding format the same.

3. Replace the saved CSS style file with the original CSS style file and reload it to see if it is compatible.

Here is a simple example, why IE6 will have style failure, the reason is that the encoding format is different, such as: HTML encoding format is UTF-8, and CSS style file encoding format is gb2312 so, it is very likely that some styles in IE6 will become invalid.

MoreArticlePlease note: programmer sharing site -- 15ae

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.