Examples of div+css typesetting
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "HTTP://WWW.W3.ORG/TR/XHTML1/DTD/XHTML1-TRANSITIONAL.D TD ";> <ptml xmlns=" http://www.w3.org/1999/xhtml "; lang= "gb2312" > <pead> <meta http-equiv= "Content-type" content=; charset=gb2312 "/> <meta http-equiv=" content-language "content=" gb2312 "/> <meta content=" All "Name=" R Obots "/> <meta name=" Author "content=" huobazi@aspxboy.com, Live targets "/> <meta" Copyright "Name=" W Ww. aspxboy.com, free copyright, arbitrary reprint. " /> <meta name= "Description" content= "www. Aspxboy.com "/> <meta name=" Keywords "content=" www. Aspxboy.com, live target, Huobazi "/> <title> div layout </title> <style> body{text-align:center;margin:0;padd ing:0}/*text-align:center is an IE must have the * * div {height:200px; color:red; }. title {margin:0 Auto; width:776px; Background-color:#abcdef; }. middle {margin:0 auto; width:776px; }. Left {float:left; Clear:right; width:20%; Background-color: #eeefff; } Center {float:left; Clear:right; width:50%; Background-color: #CCC000; }. Right {float:left; Clear:right; width:30%; Background-color: #fff000; }. both {clear:both; width:100%; Background-color: #666999; }. footer {margin:0 auto; width:776px; Clear:both; Background-color: #000fff; } </style> </pead> <body> <div class= "title" > Top </div> <div class= "Middle" > <div class= "Left" > Left-Hand </div> <div class= "center" > Central </div> <div class= "right" > Right-hand side </div> <div class= "Both" > Full line </div> <div class= "left" > Left-Hand </div> <div class= "center" > Central </div> <div class= "right" > Right-hand side </div> <div class= "Both" > Full line </div> <div class= "left" > Left-Hand </div> <div class= "center" > Side </div> <div class= "right" > right-hand </div> </div> <div class= "Footer" > Bottom </div> </body> </ptml>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]