大家好,我的代码如下:   有劳各位:   function centerPopup(){
//获取系统变量
               var windowWidth = document.documentElement.clientWidth;
 var windowHeight = document.documentElement.clientHeight;
//var popupHeight = $("#popupContact").height();
      var popupWidth = $("#popupContact").width();
//居中设置
$("#popupContact").css({
 "position": "absolute"
  "top": windowHeight/2-popupHeight/2,
  "left": windowWidth/2-popupWidth/2
       });
//以下代码仅在IE6下有效 //$("#backgroundPopup").css({
//"height": windowHeight
//});
在谷歌里是好的,但是在IE里始终在左角,而且只显示一半,根本看不见呀?
   

解决方案 »

  1.   

    #popupContact{margin:0 auto;}  /*使页面居中*/
      

  2.   

       不行啦,在PHP里。        我的是这样的
     #popupContact{
    display:none;
    position:fixed;
    _position:absolute; /* hack for internet explorer 6*/
    height:404px;
    width:408px;
    background:#FFFFFF;
    border:2px solid #cecece;
    z-index:2;
    padding:12px;
    font-size:13px;
    margin:320px 300px 400px 500px;clear:both
    }
               你会做气泡式窗口,交交我呀?