问题代码:
以下为引用的内容: <!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> <title>LieHuo.Net</title> <style type="text/css" media="screen"> <!-- #content { overflow: hidden; zoom: 1; } #left { float: left; width: 200px; } #right { background: #FFC8D0; } --> </style> </head> <body> <div id="content"> <div id="left"> left - liehuo.net </div> <div id="right"> right - liehuo.net </div> </div> </body> </html> |
解决后CSS:
以下为引用的内容: #content { overflow: hidden; zoom: 1; }
#left { float: left; width: 200px; } #right { background: #FFC8D0;overflow: hidden; zoom: 1; } |
查看运行效果:
提示:可修改后代码再运行!