当前位置: 代码迷 >> HTML/CSS >> margin:零 auto 在IE下失效,firefox下都是正常显示的,IE不能居中
  详细解决方案

margin:零 auto 在IE下失效,firefox下都是正常显示的,IE不能居中

热度:1024   发布时间:2013-11-20 12:46:02.0
margin:0 auto 在IE下失效,firefox下都是正常显示的,IE不能居中
<link rel="stylesheet" type="text/css" href="/Admin/Public/Css/style.css">
<link rel="stylesheet" type="text/css" href="/Admin/Public/Css/menu.css">
<head>
<!-- A public loading -->
<script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js” type=”text/javascript/></script>
<script>! window.jQuery && document.write('<script src="/Public/Js/jquery-1.7.2.min.js"><\/script>');</script>
<!-- A public loading end -->
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="/Public/Js/pngobject.js"></script>
<script type="text/javascript" src="/Public/Js/swfobject.js"></script>
<title>www.ctobchina</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>

<div class="con_center">
<div class="title_top"><img src="/Admin/Public/Img/top.png"></div>
<div style="clear:both;"></div>
<div class="nav"><div id="bo">
<div><img src="/Admin/Public/Img/img/nav_top.png"></div>
<ul id="menu">
<li class="L1"><a href="javascript:c(m01);" id="m01"><span><img src="/Admin/Public/Img/ico/2.gif" align="absMiddle"/> 我的办公桌</span></a></li>
<ul id="m01d" style="display:none;" class="U1">
<li class="L21"><a href="javascript:c(f40);" id="f40"><span><img src="/Admin/Public/Img/ico/2.gif" align="absMiddle"/> 电子邮件</span></a></li>
  <ul id="f40d" style="display:none;">
<li class="L3"><a href="javascript:a('email','1');" id="f1"><span><img src="/Admin/Public/Img/ico/2.gif" align="absMiddle"/>内部邮件</span></a></li>
<li class="L3"><a href="javascript:a('webmail','2');" id="f2"><span><img src="/Admin/Public/Img/ico/2.gif" align="absMiddle"/>Internet 邮件</span></a></li>
</ul>
<li class="L21"><a href="javascript:c(f41);" id="f41"><span><img src="/Admin/Public/Img/ico/2.gif" align="absMiddle"/> 短信息</span></a></li>
  <ul id="f41d" style="display:none;">
<li class="L3"><a href="javascript:a('sms','3');" id="f3"><span><img src="/Admin/Public/Img/ico/2.gif" align="absMiddle"/>内部短信</span></a></li>
<li class="L3"><a href="javascript:a('mobile_sms','42');" id="f42"><span><img src="/Admin/Public/Img/ico/2.gif" align="absMiddle"/>手机短信</span></a></li>
</ul>
</ul>
</div>
<div class="img_bottom"><img src="/Admin/Public/Img/img/menu_bottom_bg.png"></div>
</div>
<div class="con"><iframe src="#" name="i1" width="900" height="600"  scrolling="no" frameborder="0" ></iframe></div>
</div>


<div id="bottom"></div>

<script language="JavaScript">
var cur_id="";
var flag=0,sflag=0;

//-------- 菜单点击事件 -------
function c(srcelement)
{
  var targetid,srcelement,targetelement;
  var strbuf;

  //-------- 如果点击了展开或收缩按钮---------
  targetid=srcelement.id+"d";
  targetelement=document.getElementById(targetid);

  if (targetelement.style.display=="none")
  {
     srcelement.className="active";
     targetelement.style.display='';

     menu_flag=0;
     expand_text.innerHTML="收缩";
  }
  else
  {
     srcelement.className="";
     targetelement.style.display="none";

     menu_flag=1;
     expand_text.innerHTML="展开";
     var links=document.getElementsByTagName("A");
     for (i=0; i<links.length; i++)
     {
       srcelement=links[i];
       if(srcelement.parentNode.className.toUpperCase()=="L1" && srcelement.className=="active" && srcelement.id.substr(0,1)=="m")
       {
          menu_flag=0;
          expand_text.innerHTML="收缩";
          break;
       }
     }
  }
}
function set_current(id)
{
   cur_link=document.getElementById("f"+cur_id)
   if(cur_link)
      cur_link.className="";
   cur_link=document.getElementById("f"+id);
  相关解决方案