混合布局
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>混合布局编程挑战</title> <style> body{margin:0;padding:0;} div{ text-align:center} .top{ margin:0 auto;width:800px;height:200px; background:#CCC;} .main{ margin:0 auto;width:800px} .left{ width:200px; height:800px; float:left; background:#06F} .right{ width:600px;height:800px; float:right ;background:#0FC} .r_sub_left{ width:40px; height:800px;float:left; background:#C00} r_sub_right{ width:560px; height:8oopx;float:right; background:#3FF} .foot{ margin:0 auto;width:800px; height:100px;clear:both;background:#C60;margin:0 auto } </style> </head> <body> <div class="top">top</div> <div class="main"> <div class="left">left</div> <div class="right"> <div class="r_sub_left"> </div> <div class=" r_sub_right">right </div> </div> </div> <div class="foot">foot</div> </body> </html>