Pure CSS Cashing Sidebar/column height auto equal (GO)

Source: Internet
Author: User

Here is a direct introduction to what I think is the best auto-equality method for Sidebar/column height. The core CSS code is as follows (values are not fixed):

margin-bottom:-3000px; padding-bottom:3000px;

With the Overflow:hidden property of the parent tag, you can achieve a highly automatic equality effect.

To give a simple example, the following CSS and HTML code:

#content {Overflow:hidden;}. left{width:200px; margin-bottom:-3000px; padding-bottom:3000px; background: #cad5eb; Float:left;} right{width:400px; margin-bottom:-3000px; padding-bottom:3000px; background: #f0f3f9; float:right; center{margin : 0 410px 0 210px; Background: #ffe6b8; height:600px;}

<div id= "Content" > <div class= "Left" > Ieft, no height attribute, adaptive to height of highest column </div> <div class= "Right" > to, no height attribute , adaptive to the height of the highest column </div> <div class= "Center" > Center, Height 600 pixels, height of left and right two columns with adaptive </div> </div>

Pure CSS Cashing Sidebar/column height auto equal (GO)

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.