| 以下是引用片段: #bodycenter { width: 700px;margin-right: auto; margin-left: auto;overflow: auto; } #bodycenter #dv1 {float: left;width: 280px;} #bodycenter #dv2 {float: right;width: 420px;} |
两行两列
| 以下是引用片段: #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: 420px;} |
三行两列
| 以下是引用片段: #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: 420px;} #footer{ width: 700px; margin-right: auto; margin-left: auto; overflow: auto; clear:both; } |
三列
单行三列
绝对定位
| 以下是引用片段: #left { position: absolute; top: 0px; left: 0px; width: 120px; } #middle {margin: 0px 190px 0px 190px; } #right {position: absolute;top: 0px; right: 0px; width: 120px;} |
| 以下是引用片段: 这里是第一列 这里是第二列 这里是第三列 |
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;} |
以下是引用片段:This is the main content.This is the left sidebar.This is the right sidebar. |