首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > CSS >

div+css在firefox中显示正常ie中不显示解决办法

2012-05-02 
div+css在firefox中显示正常ie中不显示HTML code!--#include virtual/inc/config.asp--!--#include

div+css在firefox中显示正常ie中不显示

HTML code
<!--#include virtual="/inc/config.asp"--><!--#include virtual="/forbidIp.asp"--> <!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=gb2312"><title><%=SiteName%></title><script type="text/javascript" src="/plan_tools/jquery-1.4.2.min.js"></script><script type="text/javascript" src="/plan_tools/cutstring.js"></script><style type="text/css">body {background-attachment:fixed;background-image:url(text.txt);margin:auto;text-align:center;}input{background-color:#B0C4DE;border:1px solid #77a;}/*#csstable{border:solid #add9c0; border-width:1px 0px 0px 1px;}#csstable td{border:solid #add9c0; border-width:0px 1px 1px 0px; padding:10px 0px;}*/.btn {background-color:#B0C4DE;border:1px solid #B0C4DE;cursor:pointer;text-align:center;width:38px;display:inline-block;/*FF2.0*/-moz-display:inline-block;font-family:Verdana;*font-family:Georgia;_font-family:Tahoma;padding:0 10px 1px;*padding:3px 3px 1px;_padding:0 4px 1px;line-height:18px;*line-height:14px;_line-height:16px;height:22px;font-size:12px;}#bottomNav {z-index:999;position:fixed;bottom:0;/*for ie*/width:960px;_position:absolute;_top: expression(documentElement.scrollTop + documentElement.clientHeight-this.offsetHeight);overflow:visible;margin:auto;left:100%;margin-left:-480px;}ul{margin:0; padding:0;}.clears{clear:both;}#tit{width:400px;}   #tit ul li{display:block; line-height:25px; padding:0 5px;  float:right; font-size:12px;    #tit ul li div{margin:5px 5px;}cursor:pointer; margin-right:0px;}.bgs{border:1px solid #77a;border-left:0px; background-color:#eee;padding:5px;}.bgs a    {color:#555; text-decoration:none;}.bgs a:hover    {color:#933; text-decoration:underline;  }.lb{border-left:1px solid #77a;}#ln{position:relative; height:1px;border-bottom:1px solid #77a; bottom:-1px; z-index:-1;width:305px;margin:-2px 0px 0px 0px;}.on {border-top:0px;background-color:#B0C4DE;}#cont{font-size:14px; border:1px solid #77a;border-bottom:0px; width:398px;background-color:#B0C4DE;line-height:25px;}</style><script type="text/javascript">    function del(obj) {    var msg = "确认办结?";        if (confirm(msg)==true){            var pid;                pid=$(obj).attr('id').toString().substring(3);    $.ajax({        type: "get",        url: "/plan_tools/del.asp",        data:{dpid:pid},        dataType: "text json",        contentType: "application/json; charset=gb2312",        success: function (data) {                alert("成功办结!");        document.getElementById("addNew").innerHTML="<a href='javascript:'>您有&nbsp;<font color=red>"+eval("("+data+")").result+"</font>&nbsp;条待办事宜</a>"        if(eval("("+data+")").result=="0") document.getElementById('cons').innerHTML='<center><b>没有待办事宜</b></center>';        $("#addNew").click();        },        error: function(XMLHttpRequest, textStatus, errorThrown) {                        alert(XMLHttpRequest.status);                        alert(XMLHttpRequest.readyState);                        alert(textStatus);                    },        });                }else{            return false;        }    }$(document).ready(function(){   var $tit=$("#tit ul li");    var $cont=$("#cont > div"); //得到显示隐藏的内容   var $btn=$("#btn");   $("#cont").hide();   $("#ln").hide();   $cont.eq(0).show().siblings().hide();//【【加此句】】   $btn.click(function(){   if($("#calendar-inputField").val()=="待办时间"){        alert("请选择待办时间");        $("#calendar-inputField").click();           return false;       }   if($("#plan").val()==""){        alert("请输入待办事宜");        $("#plan").focus();           return false;       }       //新增待办事宜       var planv;       planv=$("#plan").val();       $.post("/plan_tools/addPlan.asp", {  cons: escape(planv),date:$("#calendar-inputField").val() },function (data){    document.getElementById("addNew").innerHTML="<a href='javascript:'>您有&nbsp;<font color=red>"+data.result+"</font>&nbsp;条待办事宜</a>"    alert("添加成功!");    },"json");       $("#checkList").click();   });   $tit.click(function(){      var $tit_index=$(this).index(); //得到标题索引          var tamp=$cont.eq($tit_index).is(":hidden");      if(tamp){          $("#cont").show();          $("#ln").show();          $tit.eq($tit_index).addClass("on").siblings().removeClass("on");                if($tit_index==1){              //查询待办事宜列表    $.ajax({        type: "POST",        url: "/plan_tools/selectList.asp",        dataType: "text json",        contentType: "application/json; charset=gb2312",        success: function (data) {        var myjson=eval("("+data+")");//转换为json对象        //alert(dataObj.mydata.length);//输出root的子对象数量         //开始制表        var tablediv;        tablediv="<table id='csstable'><tr><th  align='left' width=270px style='font-size:12px;color:#4B4B4B;'>待办事宜:</th><th width=70px style='font-size:12px;color:#4B4B4B;'>最后时限</th><th style='font-size:12px;color:#4B4B4B;'>办结</th></tr>";        var arr=myjson.mydata, time='', cont='',tcont='',pid='';          for (var i=0;i<arr.length;i++){              time=arr[i].time; cont=arr[i].cont;pid=arr[i].pid;              //表内容              if(cont.length>40) tcont=cont.subCHStr(2, 40)+"...";              if(cont.length<=40) tcont=cont;             tablediv=tablediv+"<tr><td width=270px style='font-size:12px;color:#4B4B4B;' onclick='alert(document.getElementById(\"hid"+i+"\").value)' onmouseover=\"Tip('点击查看全部内容')\" onmouseout=\"UnTip()\" >"+tcont+"<INPUT TYPE=hidden id='hid"+i+"' VALUE='"+cont+"'></td><td width=70px style='font-size:12px;color:#4B4B4B;'>"+time+"</td><td align=right><button onclick='del(this)' class='btn' id='btn"+pid+"' onmouseover=\"Tip('已办结')\" onmouseout=\"UnTip()\"><img src='/plan_tools/yes.gif' ></img></button></td></tr>"                   }          tablediv=tablediv+"</table>";          document.getElementById('cons').innerHTML=tablediv;        },        error: function(XMLHttpRequest, textStatus, errorThrown) {                        alert(XMLHttpRequest.status);                        alert(XMLHttpRequest.readyState);                        alert(textStatus);                    },        });          }      //$tit.eq($tit_index).addClass("on"); //切换背景      $cont.eq($tit_index).show().siblings().hide();      }else{      $("#cont").hide();      $("#ln").hide();      $tit.eq($tit_index).removeClass("on").siblings().removeClass("on");      $tit.eq($tit_index).addClass("gbs").siblings().addClass("bgs"); //切换背景       //$(this).addClass("bgs").siblings().addClass("bgs");      }   });});</script>    <link rel="stylesheet" type="text/css" href="/plan_tools/JSCal2/css/jscal2.css" />    <link rel="stylesheet" type="text/css" href="/plan_tools/JSCal2/css/border-radius.css" />    <link rel="stylesheet" type="text/css" href="/plan_tools/JSCal2/css/win2k/win2k.css" />    <script type="text/javascript" src="/plan_tools/JSCal2/js/jscal2.js"></script>    <script type="text/javascript" src="/plan_tools/JSCal2/js/lang/cn.js"></script></head><body><script type="text/javascript" src="/plan_tools/wz_tooltip.js"></script><div style="clear:both;"></div><div id="datediv"></div><div id="bottomNav"><div id="cont">   <div>   <font style="line-height:18px;font-size:12px;color:#4B4B4B;">新增事宜:</font>   <table>   <tr>   <td width=270px><input type="text" id="plan" style="width:270px;color:#4B4B4B"></td>   <td width=70px><input id="calendar-inputField" readonly value="待办时间" style="text-align:center;color:#4B4B4B;width:70px;"/>        <script>            Calendar.setup({                trigger    : "calendar-inputField",                inputField : "calendar-inputField"            });        </script>    </td>    <td align=right><button class="btn" id="btn" onmouseover="Tip('确定添加')" onmouseout="UnTip()"><img src="/plan_tools/yes.gif" ></img></button></td>   </tr>   </table></div>   <div id="cons"></div></div><div id="ln"></div><div id="tit">   <ul>      <li class="bgs" id="checkList" onmouseover="Tip('新增待办事宜')" onmouseout="UnTip()" style="padding:5px 5px 0px 5px;width: 16px; height: 20px"><div><img src="/plan_tools/add.gif"></img></div></li>      <li class="bgs lb" id="addNew"><a href="javascript:">您有<font color=red>      <%      set rspt = conn.execute("select count(0) from planList where p_sata=0")        if not rspt.eof then            response.write rspt(0)            response.write "<script>document.getElementById('cons').innerHTML='<center><b>没有待办事宜</b></center>'</script>"        end if        rspt.close      %>      </font>条待办事宜</a></li>   </ul></div></div></body></html> 



[解决办法]
_top: expression(documentElement.scrollTop + documentElement.clientHeight-this.offsetHeight);


这句的问题,建议最好不要在css中写表达式。

这个效果 楼主 用js来写吧

热点排行