After the HTML file is converted to An ASPX file, the style is lost or invalid.

Source: Internet
Author: User

ASPX page style error caused by Chinese annotation in CSS

 

 

Today, we have encountered a very strange problem: webpage design uses layer layout for pages

After sending it to us, the static html page is normally displayed under IE6,

In vs, after the extension is changed to aspx, the page will be completely changed, the style cannot be applied, and the layout is incorrect.

After that, my colleagues found that the Chinese comments were added to CSS. The Chinese comments in CSS were deleted and displayed normally.

PS: this situation does not appear in IE7, but in Firefox and IE6.

Original article:

If there is no problem with the original HTML + CSS, after you change it to aspx, the. NET environment will change the HTML encoding format to UTF-8 after compilation. If your CSS file is not changed, the CSS becomes invalid.

Check whether the CSS file is garbled. The simplest way is to delete the Chinese comments in the CSS file first.

 

OK!

Have time to come and play in my hometown!

 

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.