Common Layout code for div + CSS Webpage Design

Source: Internet
Author: User
Body of a single row column {margin: 0px; padding: 0px; text-align: center ;}# content {margin-left: auto; margin-Right: auto; width: 400px; width: 370px;} two rows and one column of body {margin: 0px; padding: 0px; text-align: center ;}# content-top {margin-left: auto; margin-Right: auto; width: 400px; width: 370px; }# content-end {margin-left: auto; margin-Right: auto; width: 400px; width: 370px;} Three rows and one column of body {margin: 0px; padding: 0px; text-align: center ;}# content-top {margin-left: auto; margin-Right: auto; width: 400px; width: 370px;} # Content-mid {margin-left: auto; margin-Right: auto; width: 400px; width: 370px ;} # Content-end {margin-left: auto; margin-Right: auto; width: 400px; width: 370px;} two rows in a single row # bodycenter {width: 700px; margin-right: auto; margin-left: auto; overflow: auto;} # bodycenter # dv1 {float: Left; width: 280px;} # bodycenter # dv2 {float: Right; width: required PX;} two rows and two columns # header {width: 700px; margin-Right: auto; margin-left: auto; overflow: auto;} # bodycenter {width: 700px; margin-Right: auto; margin-left: auto; overflow: auto;} # bodycenter # dv1 {float: Left; width: 280px;} # bodycenter # dv2 {float: right; width: pixel PX;} Three rows and two columns # header {width: 700px; margin-Right: auto; margin-left: auto;} # bodycenter {width: 700px; margin-right: auto; margin-left: auto;} # bodycenter # dv1 {float: Left; width: 280px;} # bodycenter # dv2 {float: Right; width: 410px ;} # footer {width: 700px; margin-Right: auto; margin-left: auto; overflow: auto;} // the three columns of the row at www.qpsh.com are definitely located # Left {position: absolute; top: 0px; left: 0px; width: 120px; }# middle {margin: 20px1_px20px1_px; }# right {position: absolute; top: 0px; Right: 0px; width: 120px;} float locates An XHTML: <divid = "warp"> <divid = "column"> <divid = "column1"> here is the first column </div> <divid = "column2"> here is the second column </div> <divclass = "clear"> </div> <divid = "column3"> the third column </div> <divclass = "clear"> </div> CSS: # wrap {width: 100%; Height: auto;} # column {float: Left; width: 60% ;}# column1 {float: Left; width: 30% ;} # column2 {float: Right; width: 30% ;}# column3 {float: Right; width: 40% ;}. clear {clear: Both;} float Location 2 XHTML: <divid = "center" class = "column">

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.