Ver Mensaje Individual
  #4 (permalink)  
Antiguo 29/05/2011, 21:46
Avatar de abimaelrc
abimaelrc
Colaborador
 
Fecha de Ingreso: mayo-2009
Ubicación: En el planeta de Puerto Rico
Mensajes: 14.734
Antigüedad: 15 años
Puntos: 1517
Respuesta: Hacer visible un Div sobre un iframe

Lo que sucede es que z-index trabaja con los que tienen ya posiciones. Es decir cuando hayas declarado position, float, left, right, top o bottom, te recomiendo esta lectura http://www.librosweb.es/referencia/css/z-index.html
Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. *{ margin: 0; padding: 0; }
  4. iframe{
  5.     width: 300px;
  6.     height: 300px;
  7.     background-color: #000;
  8. }
  9. #wrap{
  10.     width: 300px;
  11.     margin: 0 auto;
  12.     position: relative;
  13. }
  14. #div1{
  15.     position: absolute;
  16.     top: 100px;
  17.     left: 100px;
  18.     width: 100px;
  19.     height: 100px;
  20.     z-index: 100;
  21.     background-color: #fff;
  22. }
  23. </head>
  24. <div id="wrap">
  25.     <div id="div1"></div>
  26.     <iframe src="#"></iframe>
  27. </div>
  28. </body>
  29. </html>
__________________
Verifica antes de preguntar.
Los verdaderos amigos se hieren con la verdad, para no perderlos con la mentira. - Eugenio Maria de Hostos