Solutions to the effectiveness of Div + CSS layout page styles in ASP. net2.0

Source: Internet
Author: User

Problem description:
I recently wrote a website that adopts the DIV + CSS layout. In the debugging process, we found that IE7 and FF are both compatible. However, when IE6 is not compatible, the style of some layers does not work and is not executed at all, just like losing control. The layout was rewritten twice. Is it true that IE6 has such a difficult compatibility.
Solution:
Step 1: Find a machine in the IE environment, install DW for layout, and find that the CSS is not compatible with IE6, and there are some minor changes.
Step 2: Apply the CSS to the project. IE7 and FF are normal, but the IE6 problem still exists. Just try uploading the HTML static pages tested in the DW environment to the server. The resolution result is the same as that of a single server.
Step 4: the cause of the analysis is that the parsing result of Asp.net is different from that of HTML. Try to paste the content of the static page to the aspx file for testing. The results are still out of order.
Step 5: Compare the execution result of the aspx file with that of the HTML file. Is it Asp.net internal parsing execution ??
Step 6: Check the information online. Comments will affect the style execution. Therefore, the style comments written in the CSS file are removed, and the style comments on the page are removed and executed. The test results are displayed in a general layout, but the local style is still not applied.
Step 7: Considering the file encoding problem, isn't the CSS style file not recognized?
View the attributes of the CSS file. The original encoding is ANSI, while Asp.net supports UTF-8. Open the CSS file in notepad and save it as a Utf-8 encoding file. The test result is HTML file execution.
Step 8: use it! Important partially corrected the IE6 execution style, and the page execution results achieved the expected results.

Summary:
In the DW environment, CSS files are encoded in ANSI. Apply it to the ASP. net2.0 project and modify its encoding method.
CSS style files are recommended not to be annotated. Annotations May cause parsing errors and style exceptions in some cases.

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.