日期:2014-05-17  浏览次数:20887 次

div对齐问题!
<!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="X-UA-Compatible" content="IE=EmulateIE7" />
<meta http-equiv="Expires" content="Tue, 12 May 2001 1:00:00 GMT" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Content-type" content="text/html;" />
<link href="res/WebClient.ico" rel="SHORTCUT ICON" />
<style type="text/css">
*{margin:0;padding:0;}
div,table,tr,td,input,img,ul,label{margin:0; padding:0;}
body {font-size:12px; font-family:Tahoma,Verdana;}
img{ border:0;cursor:pointer;}
a{text-decoration:none;}
/*public*/
</style>

</head>
<body style="font-size: 12px; background: url(res/bg.png) repeat-x left top;" onresize="OnResize()"
  onload="OnLoadPage()" onunload="OnUnloadPage()" onkeypress="OnBodyKeyDown()">
  <div id="div_client" style="width: 992px; text-align: center; margin: 5px auto 0 auto;padding: 0; position: relative;overflow:hidden;">
  <div id="work_area" style="width: 980px; float: left; margin-top: 5px; border:solid 1px #767778; background-color:#D4E8FE;">
  <div id="div_info" style="width: 980px; position: relative;padding: 0;text-align: left;
  border-bottom: solid #D4E8FE 20px;">
  <div id="div_info_index" style="width: 170px; background-color: #F4F7FE; margin: 20px 0 0 8px;
  border: solid 1px #000; padding: 0;">
  <ul id = "left_nav" style ="height:648px;">
  <li class = "L11 nav21"><a id = "m21" href = "javascript:NavSelected(m21);GotoInfoBody('body_basic_info.html',1);">SYSTEM</a></li>
  <li class = "L11 nav22"><a id = "m22" href = "javascript:NavSelected(m22);GotoInfoBody('body_event_info.html',2);">EVENT</a></li>
  <li class = "L11 nav23"><a id = "m23" href = "javascript:NavSelected(m23);GotoInfoBody('body_log_info.html',3);">LOG</a></li>
  <li class = "L11 nav24"><a id = "m24" href = "javascript:NavSelected(m24);GotoInfoBody('body_net_info.html',4);">NETWORK</a></li>  
  <li class = "L11 nav25"><a id = "m25" href = "javascript:NavSelected(m25);GotoInfoBody('body_online_info.html',5);">ONLINE</a></li>
  </ul>
  </div>
  <div id="div_info_body" style="width: 780px; position: absolute; left: 190px; top: 0;
  margin: 20px 0 0 0; padding: 0;">
  <div style ="width:778px; border:solid 1px #567782; height:648px; background-color:#F4F7FE;">3333333333333</div>
  </div>  
  </div>  
  </div>
  </div>
</body>
</html>


以上代码在IE下显示正常,但是在safari下左右两个div总是不对齐,改了很久也没有改好,不知道什么原因!

------解决方案--------------------