How to deal with the floating problem of div+css layout

Source: Internet
Author: User

  last shared the "Div+css Web design making page layout tips to share!" ", I believe we have some understanding of the layout of the Web page, in fact, in our DIV+CSS page layout, there will be a floating CSS layout problems." Here's how to deal with the floating problem of div+css layout under sharing.
Look at the following code fragment first:
CSS code:
#left {float:left;width:200px;}
#right {float:right;width:800px;}
page code:
<body>
<div id= "content"
<div Id= "Left" > column </div>
<div id= "Right" > right-hand column </div>
</div
</body>
This is the most common code we use for CSS writing to make the left and right layout. There are other ways to write CSS, such as the left side of the fixed width right automatic adaptation.
Fixed width right of the left side automatically adapts CSS code:
#left {float:left; width:200px;}
#right {margin-left:200px;}
above the writing of CSS is the most standard CSS writing, if the above based on the writing of the CSS code and the appearance of floating around the phenomenon, it needs to check the left and right side of the code is written norms,</div> This div end code is caused by more or less writing. We only need to pay attention to the above situation, basically can solve the div+css layout around floating problem. reprint Please specify: http://www.ommclean.com

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.