<html><head><title>css</title><style type="text/css"> #up {background-color:red;width:100px;height:100px;float:left;} #down {background-color:red;width:100px;height:100px;clear:left;margin-top:10px;float:left;} #right {background-color:red;width:100px;height:210px;float:left;margin-left:10px;} </style> </head> <body> <div id="up"></div> <div id="down"></div> <div id="right"></div> </body> </html> 以上代码是在ie 7里面可以正常显示,但在ff里就显得不正常了,应该怎么改啊!
加个left层吧 HTML: <html><head><title>css</title><style type="text/css"> #left {float:left;} #up {background-color:red;width:100px;height:100px;float:left;} #down {background-color:red;width:100px;height:100px;clear:left;margin-top:10px;float:left;} #right {background-color:red;width:100px;height:210px;float:left;margin-left:10px;} </style> </head> <body> <div id="left"> <div id="up"></div> <div id="down"></div> </div> <div id="right"></div> </body> </html>