CSS Invalid page garbled reason compatibility problem-handwriting CSS code note what

Source: Internet
Author: User

CSS Invalid page garbled reason compatibility problem-handwriting CSS code note what

What we should pay attention to when we write HTML code and CSS code, this section we explain the case and coding problems. (Body feeling music)

Garbled vs Code
Before we introduced the cause of the Web page garbled, CSS invalidation and other reasons are due to their own writing time did not pay attention to the coding problem, do not encode conversion problems, often because of their own writing when using a code, found that others better than the good div+css fragments more directly copied over to use, The result of someone else coding and their own code does not conform to the Web page in IE garbled, or CSS invalidation (CSS declaration). The solution uses the encoding conversion function in the software to make the code conversion of the Web page. such as using the function conversion encoding in Dreamweaver. -Learn about Language coding CharSet page coding knowledge

Case vs Fail (somatosensory music)
1. CSS naming selectors large lowercase for attention
Often we can see the problem when we use the full-width or Chinese input method when we write HTML, but in the case of handwritten CSS code, the selector of the CSS name is "." The uppercase result will invalidate this CSS selector, so note the CSS selector case. (Be sure to use half-width english input method lowercase)

2. The semicolon case in CSS properties (somatosensory music)
When writing CSS properties in CSS selectors, we often need to use ";" When we don't notice the end of each CSS property and corresponding value. Ending a split, or not writing or capitalizing, causes the property in this selector to expire. Of course a CSS property selector last one can end without semicolons, but we must add in order to develop good habits. (The CSS property of each CSS selector curly brace must end with a half-width lowercase semicolon ";") End. )

DIVCSS5 Summary: (Body sense music)
Whether using a tool to make a div CSS Web page or handwriting, usually pay more attention to these small problems, little bit of accumulation and develop good habits will make you in the production of Web pages when not error-prone, remember the details determine success or failure!

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.