Thank you for your reply. I have modified the code as you said, but it still does not work in tables. Also, the JavaScript to set the height and width is now broken in Mozilla (not as big of an issue). Your help is very much appreciated.
This is what I have now. The blocks inside the table do not work in IE, while those outside the table do. Any ideas? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="content-style-type" content="text/css" /> <title>CSS Z-Index Test</title> <style type="text/css"> #wrapper, #wrapper2 { position: relative; background-color: #00ff00; } #over, #over2 { background-color: #999999; opacity: 0.5; filter: alpha(opacity=50); -moz-opacity: 0.5; position: absolute; z-index: 999; } #under, #under2 { overflow: visible; border-color: #ff0000; border-style: solid; border-width: 2px; } </style> </head> <body> <table> <tr> <td> <div id="wrapper"> This does not work correctly.<br> <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> </div> </td> </tr> </table> <div id="wrapper2"> This does work correctly.<br> <div id="over2"></div> <div id="under2"> <p>There is some text here</p> <p>It determines the size of the panel.</p> </div> <script type="text/javascript"> document.getElementById("over2").style.width = document.getElementById("under2").scrollWidth; document.getElementById("over2").style.height = document.getElementById("under2").scrollHeight; </script> </div> </body> </html> Thanks, David From: Adam Ducker <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Cc: css-d@lists.css-discuss.org Date: 07/28/2008 03:52 PM Subject: Re: [css-d] z-index in IE [EMAIL PROTECTED] wrote: > 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). Once you get a valid doctype and HTML then this is a simple XHTML strict example like yours that for sure works: http://adamducker.com/public/example001/ -Adam Ducker (http://adamducker.com) ______________________________________________________________________ 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/