◆DIV+CSS三行三列布局(兼容各種浏覽器)
- <!DOCTYPEHTMLPUBLIC"-//W3C//DTDHtml4.01//EN"
- "http://www.w3.org/TR/Html4/strict.dtd">
- <Html>
- <HEAD>
- <TITLE>DIV布局測試</TITLE>
- <styletypestyletype="text/CSS">
- DIV
- {
- height:150px;
- }
- DIV.left
- {
- width:20%;
- float:left;
- clear:right;
- background-color:#eeeeee;
- }
- DIV.center
- {
- width:50%;
- float:left;
- clear:right;
- background-color:#CCCCCC;
- }
- DIV.right
- {
- width:30%;
- float:left;
- clear:right;
- background-color:#808080;
- }
- DIV.both
- {
- width:100%;
- clear:both;
- background-color:#696969;
- }
- </style>
- </HEAD>
- <BODY>
- <DIVclassDIVclass="left">左側</DIV>
- <DIVclassDIVclass="center">中側</DIV>
- <DIVclassDIVclass="right">右側</DIV>
- <DIVclassDIVclass="both">全行</DIV>
- <DIVclassDIVclass="left">左側</DIV>
- <DIVclassDIVclass="center">中側</DIV>
- <DIVclassDIVclass="right">右側</DIV>
- </BODY>
- </Html>