Classic left and right columns layout CSS

Source: Internet
Author: User

/*************************************** ***************
*
* Classic left and right columns layout CSS
*
**************************************** *************/
/* Outer package Layer */
. Outdiv {
Overflow: hidden;/* automatically expands IE7, IE8, and FF boxes */
Zoom: 1;/* solves the automatic expansion of IE6 box */
}
/* Left */
. Left {
Float: left;
Display: inline;/* solves the problem of IE6 bilateral distance */
Margin: 20px;/* If margin is set here, the margin setting on the right is invalid */
_ Margin-Right: 17px;/* solves the IE6 3 pixel problem */

}
/* Right */
. Right {
Margin: 30px;/* The left margin here does not work, which is equivalent to margin-left: 0 ;*/
Overflow: hidden;/* automatically expands IE7, IE8, and FF boxes */
Zoom: 1;/* solves the automatic expansion of IE6 box */
}

 

Note: if there are more columns, we recommend that you use the margin attribute instead of padding for each box. If there are more than three columns, use ul Li for sorting.

Related Article

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.