DIV+CSS the outer background of the color disappeared solution

Source: Internet
Author: User
<div class= "header" ><div class= "Header_left" >header_left</div><div class= "Header_right" > header_right</div></div>.header{width:1000px;background:red;}. header. Header_left{width:600px;background:green;float:left;}. header. Header_right{width:400px;background:pink;float:right;}. Clear{clear:both, this div+css is  normal in IE and chrome, but the background color of the header in Firefox is not shown, add <div class= after the. Header_right tag. Clear "></DIV> the background color of the outer layer is not a problem, but there is a blank line above the. Header, and the solution found online is to add Overflow:hidden to the CSS style of the outer div; The result can really solve the problem, but the cause  O (∩_∩) o~  

DIV+CSS the outer background of the color disappeared solution

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.