Hello all. I am trying to create a script that will pop-up an image and darken the rest of the page. The darkened background is a separate DIV that overlays the entire page. I have it working in FF, but not in IE6/win. Here's my code:
Code:
<html>
<head>
<title>Test Page</title>
<link rel="stylesheet" type="text/css" media="all" href="popup/popup.css" />
</head>
<body>
<div id='pop'></div>
</body>
</html>
Code:
#pop {
position:absolute;
height:100%;
width:100%;
top: 0px;
left: 0px;
background:#000;
filter:alpha(opacity=36);
-moz-opacity:0.36;
opacity:0.36;
}
This should create a DIV that covers the whole page. Works in FF, as I stated above. But in IE it shows a wide but short rectangle at the top of the page. I can get around this by adding the following CSS:
Code:
html, * {
margin:0 0 0 0;
}
body {
height:100%;
}
But I don't want this. I don't want to alter the CSS for anything major since I plan to use the code on multiple sites that each have unique CSS, some with custom html and body CSS values.
Is there any way to keep the DIV positioned as absolute (I need that as well), not change the html or body CSS, and have it cover the whole page in IE6?
Any help is appreciated.
Thanks in advance,
-Tim
|