サイトに jquery ポップアップ ウィンドウ スクリプトがあります。クロムでは問題なく動作しますが、Firefox ではウィンドウを開くと、一番上に表示されます。例えば。
________________________
| | | |
| | popup | |
| | | |
| |___________| |
| |
|_______________________|
popup.js のスクリプト:
function centerPopup(){
var windowWidth = document.documentElement.clientWidth;
var windowHeight = document.documentElement.clientHeight;
var windowTop =window.screenTop;
var popupHeight = $(".popupContent").height();
var popupWidth = $(".popupContent").width();
$(".popupContent").css({
"position": "fixed",
"top": (windowTop+250)-popupHeight/2,
"left": windowWidth/2-popupWidth/2
});
//this is needed for ie6
$(".backgroundPopup").css({ "position": "fixed", "height": windowHeight, "top": windowTop });
}
正しく機能させるために何を変更する必要があるか、誰かが提案できますか?
アップデート
上記のコードは popup.js スクリプトからのもので、popup.css もあります。この部分の何かが競合しているか、問題を引き起こしているかどうかはわかりません
.popupContent{
display:none;
align: center;
position: fixed;
_position: fixed;
height:auto;
width:500px;
background:#fff;
z-index:9999;
padding:8px;
-moz-border-radius: 10px;
-webkit-border-radius: 5px;
-khtml-border-radius: 5px;
border-radius: 5px;
background-color: #15150B;
border:2px solid #C9C58F;
}