visitor (0 QPoints)
  • FR
  • EN
  • NL
  • DE
  • ES
304 experts, 1182 utilisateurs inscrits, 1626 questions déjà répondues
European Experts Exchange, le meilleur site pour des solutions de qualité

New Improved Search!

 


Le lien vers le DDRK est de nouveau fonctionnel.
Nous avons subi une coupure d'une semaine, désolé.
(23-30/01/2010)

Web :: Problèmes de navigateurs :: z-index problem with Internet Explorer between DIV and SELECT


Par : Josdeveld Belgique  Date : 02/05/2006 09:31:56  Anglais  Points: 20 État : Répondue
Qualité : Excellente
Hello,

I think I have the classical z-index problem with Internet Explorer between DIV and SELECT. The SELECT stays "on top" whatever the z-index is set to.

How to solve this ?
Par : VGR Date : 02/05/2006 09:33:03 Anglais  Type : Réponse
Salut :D

Have a read at this page

Here's a sample code :

<html> <head> <script> function DivSetVisible(state) { var DivRef = document.getElementById('PopupDiv'); var IfrRef = document.getElementById('DivShim'); if(state) { DivRef.style.display = "block"; IfrRef.style.width = DivRef.offsetWidth; IfrRef.style.height = DivRef.offsetHeight; IfrRef.style.top = DivRef.style.top; IfrRef.style.left = DivRef.style.left; IfrRef.style.zIndex = DivRef.style.zIndex - 1; IfrRef.style.display = "block"; } else { DivRef.style.display = "none"; IfrRef.style.display = "none"; } } </script> </head> <body> <form> <select> <option>A Select Box is Born ....</option> </select> </form> <div id="PopupDiv" style="position:absolute; top:25px; left:50px; padding:4px; display:none; background-color:#000000; color:#ffffff; z-index:100"> .... and a DIV can cover it up through the help of an IFRAME. </div> <iframe id="DivShim" src="javascript:false;" scrolling="no" frameborder="0" style="position:absolute; top:0px; left:0px; display:none;"> </iframe> <a href="#" onclick="DivSetVisible(true)">Click to show DIV.</a> <a href="#" onclick="DivSetVisible(false)">Click to hide DIV.</a> </body> </html>

Par : VGR Date : 02/05/2006 09:34:15 Anglais  Type : Commentaire
Nota Bene : the blank lines above are in fact &lt;BR&gt; tags, and this is working for Internet Exploder 5.5 +

have fun :D
Par : Josdeveld Date : 03/05/2006 10:44:58 Anglais  Type : Commentaire
cool stuff, thanks.

Inscrivez-vous pour répondre

 Add This Article To:
 del.icio.usDel.icio.us  diggDigg  googleGoogle  spurlSpurl
 blinkBlink  wongWong  simpySimpy  yahooY! MyWeb 
EContact
browser fav
page générée en 43.287040 millisecondes

Why Google AdSense ads ?

compteur
 Ranking-Hits PageRank for this page