Last time, I shared the layout skills of DIV + CSS webpage design and production pages. I believe we have some knowledge about the web page layout technique. In fact, when we conduct div + css web page layout, the css layout will fluctuate between the left and right. Here we will share with you how to handle the floating problem between the left and right sides of the div + css layout. First look at the following code snippet: css code:
# Left {float: left; width: 200px; }# right {float: right; width: 800px ;}
Page code: <body> <div id = "content"> <div id = "left"> left column </div> <div id = "right"> right column </div> </div> </body> This is the most commonly used code for Left and Right layout in css writing. There are other methods for css writing, such as fixed width on the left side and automatic adaptation on the right side. The right side of the fixed width on the left side automatically adapts to the css code: # left {float: left; width: 200px; }# right {margin-left: 200px ;}
# Left {float: left; width: 200px;} # right {margin-left: 200px ;}
The above css writing is the most standard css writing. If the css code written on the basis of the above changes between the left and right, check whether the code in the left and right sides is standardized. </div> whether the code at the end of this div is written more or less. We only need to pay attention to the above situation and basically solve the problem of div + css layout floating around. Reprinted Please note: http://www.jnsino.com