Afficher un message
Vieux 13/03/2008, 17h35   #1
KDawg44
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Pop up div with grayed out background

Hi,

I have a div that pops up to alert some folks when they log in to our
site. I have a second div that grays out the background except for
the pop up div.

Here is my CSS:

<style type="text/css">
#popup {
position: absolute;
left: 420px;
top: 200px;
z-index: 1001;
visibility: hidden;
border: solid;
border-color: #7BC041;
}
#grayBG {
position: absolute;
top: 0px;
bottom: 0px;
left: 0px;
right: 0px;
overflow: hidden;
padding: 0;
margin: 0;
background-color: #000;
filter: alpha(opacity=50);
opacity: 0.5;
z-index: 1000;
}
</style>
......

<div id="grayBG"></div>

<div id="popup" style="">
Pop up code
</div>

There is some JavaScript that is called to change the visibility.

All of this works great in Firefox but in IE 7, the gray div is in the
upper right corner and very small. It does not cover the whole page.
It does not stretch over the whole screen.

How can I do this in IE? I have tried adding attributes like width:
100%; and height: 100%; to no avail.

Please ! Naturally, most of the people viewing this will use IE!

Thanks very much.

Kevin
  Réponse avec citation
 
Page generated in 0,05403 seconds with 9 queries