When you use position:absolute, don't you have to specify the position
with the user of top and right or left? 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Monday, July 28, 2008 11:25 AM
To: css-d@lists.css-discuss.org
Subject: [css-d] z-index in IE

Hi,

Would someone please help me?  I have read every article I could find
from Google and tried many different things to get this working, but to
no avail.  I would like to superimpose the "over" div on top of the
"under" 
div.  It works in Mozilla, but not IE (7).  The following is my sample
code:

<html>
<head>
  <title>CSS Z-Index Test</title>
  <style>
#over {
  background-color: #999999;
  opacity: 0.5;
  filter: alpha(opacity: 0.5);
  position: absolute;
  z-index: 999;
}
#under {
  overflow: visible;
  background-color: #ffffff;
  border-color: #ff0000;
  border-style: solid;
  border-width: 2px;
}
  </style>
</head>
<body>
  <span style="position: relative;">
    <div id="over"></div>
    <div id="under">
      <p>There is some text here</p>
      <p>It determines the size of the panel.</p>
    </div>
    <script type="text/javascript">
      document.getElementById("over").style.width =
document.getElementById("under").scrollWidth;
      document.getElementById("over").style.height =
document.getElementById("under").scrollHeight;
    </script>
  </span>
</body>
</html>

Thank you,
David
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/ List policies --
http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to