Because now 99.99% of the CMS is to use DIV+CSS to build the Web page template, was forced helpless, a lot of age to learn CSS, to tell the truth did not feel the layout with div better than table where! But by force, first bite the bullet to see, can learn how much is how much.
According to the principle of separating the data from the structure, CSS is better to be independent of the Web page file,
Copy Code code as follows:
<link rel= "stylesheet" type= text/css "href=". /xxx/web.css "/>
Statement to transfer a CSS file into a Web page file, it is not recommended to write CSS code directly in the Web page file. The advantage of doing so is to modify the convenience, the second is to search engine friendly, those search engine crawler crawling up also carefree.
Margin and Padding properties
The margin and padding attributes can be easily understood as the outer and inner margins of elements: Margin-top, Margin-right, Margin-bottom, Margin-left, Padding-top, Padding-right, Padding-bottom and Padding-left
Class and ID Difference
To put it simply, an ID name can appear only once in a page and class may appear multiple times, of course, if an ID name appears in a page two times, the appearance of the opposite page but what effect, just do not conform to the W3 specification. A single element, or something that requires a program or JS control, needs to be defined with an ID, a reused element, and a class definition.