The day before yesterday to do the only product will be the Web page, directly led me to accumulate a lot of days very inflated confidence shattered into a piece of slag, div nesting and can not handle all the layout and format, for example:
<div><div><div><<div></div>/div></div></div>, The size of the body itself will make the div overflow condition, float and many other tags will be directly to the Div lost, and in the format, also appears to be very fluid, so how to layout for a page, how to avoid the various div nested each other caused by overflow situation occurs, Is the most serious of making a finished page.
Today, the success of the only product will be the Web page, now a part of the code paste as follows:
<div id= "Main" >
<div class= "Tou" >
<!--the upper part of the page--
<div class= "Zuoshang" >
<a id= "DL" href= "><H1 > Products
<a id= "XL" href= "> a special website for sale </a>
</div>
<div class= "Youshang" >
</div>
</div>
<!--the center of the page--
<div id= "Mid" >
<!--left part--
<div class= "left" ></div>
<!--right Half--
<div class= "Right" >
<div id= "Xiaozi" >
<div class= "Text1" > Welcome registration </div>
<div class= "Text2" > Registered to <a class= "Fen" href= "./denglu.html" > Direct login </a></div>
Still a lot of div nested, but add class and ID in Div, use external style, can shorten the length of the whole code page, because in many cases the style even more than the body, such layout, the entire code page will look very clear, in the future to make changes, It will be easier and more convenient.
Adding comments to numerous Div's will play a very good role.
This article is from the "12244243" blog, please be sure to keep this source http://12254243.blog.51cto.com/12244243/1873597
PHP Learning Eighth day--div with class and ID