为什么我用div+css排版,排的仅仅有条,可在浏览器里就变得乱七八糟了呢拜托了各位 谢谢
2个回答
展开全部
<!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>idnide</title> </head> <style type="text/css"> body { margin:0px; text-align:center; font-family:Arial, Helvetica, sans-serif; font-size:12px; background-image: url(../images/7-8.jpg); background-repeat: repeat-x; } * { margin: 0; padding: 0; border: 0; } #logo{ float:left; height:100px; width:1000px; text-align:center; } #mian { height:50px; width:1000px; background-image: url(mian1.jpg); text-align:center; } #body { width:1000px; height:auto; margin-top: 0px; margin-right: auto; margin-left: auto; margin-bottom: 0px; } table { float: left; height: auto; width: 1000px; } #top{ float:left; height:30px; width:200px; margin-left: 51px; background-image: url(bt-2.jpg); } #top-1{ float:left; height:30px; width:500px; background-image: url(bt2.jpg); } #top-2{ float:left; height:30px; width:300px; background-image: url(bt3.jpg); } #top-1-1{ float:left; height:200px; width:200px; margin-left: 51px; } #top-2-2{ float:left; height:200px; width:500px; } #top-3-3{ float:left; height:200px; width:300px; } </style> <body> <div id="body"> <div id="logo"> <img src="indin.jpg" width="1000" height="100" /></div> <div id="mian"><img src="mian0.jpg" width="200" height="50" /><img src="mian2.jpg" width="200" height="50" /><img src="mian4.jpg" width="200" height="50" /><img src="mian3.jpg" width="200" height="50" /><img src="mian5.jpg" width="200" height="50" /></div> <table width="1000" height="300" align="center"> <tr> <td width="200" height="37"background="bt2.jpg"> </td> <td width="500" background="bt2.jpg"> </td> <td width="300" background="bt3.jpg"> </td> </tr> <tr> <td valign="top"> </td> <td> </td> <td> </td> </tr> </table> <table width="1000" height="300" align="center"> <tr> <td width="200" height="37"background="bt2.jpg"> </td> <td width="500" background="bt2.jpg"> </td> <td width="300" background="bt3.jpg"> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> </table> </div> </body> </html>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询