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!