要记得,centent也要浮动的
整理好的css样式如下:
#header {width:50px;height:50px;background:#f69;margin:0px auto}
#center{width:150px;height:50px;background:#ccc;margin:0px auto}
.left {width:50px; height:50px; background:#03f;float:left}
.centent {width:50px;height:50px;background:#960;float:left;margin:0px auto}
.right {width:50px;height:50px;background:#06c;float:right}
#footer {width:50px;height:50px;background:#f33;margin:0px auto}