Ver Mensaje Individual
  #4 (permalink)  
Antiguo 18/11/2009, 09:20
kseso?
Colaborador
 
Fecha de Ingreso: junio-2007
Mensajes: 5.798
Antigüedad: 16 años, 10 meses
Puntos: 539
Respuesta: Superponer div con imgs

Cita:
Y la position absolute no me funciona con el IE
¿Estás seguro?i fíjate que ni pregunto si hablas de ie6 o ie7

Prueba lo siguiente:
Código hrml:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es-es">
  3. <head>
  4. <title>kseso? jugando con css</title>
  5. <style type="text/css">
  6. * {margin: 0; padding: 0; border: 0; position: relative;}
  7. * html, * body { height: 100%; overflow:auto;}
  8. html, body {
  9. background-color: #cdcdcd;
  10. }
  11. #container {
  12. margin:10px auto;
  13. width:480px;
  14. }
  15. #container img.principal {
  16. left:0;
  17. position:relative;
  18. top:0;
  19. }
  20. .play {
  21. position:absolute;
  22. left:50%;
  23. top:50%;
  24. margin-left: -22px;
  25. margin-top: -22px;
  26. }
  27. </style>
  28. </head>
  29. <body>
  30. <div id="container">
  31. <img class="principal" src="http://share.skype.com/sites/es/skype/skype32ready.jpg" alt="una imagen" />
  32. <a  class="play" href="#"><img src="http://www.aulaclic.es/articulos/graficos/play.gif" alt="#" /></a>
  33. </div>
  34. </body>
  35. </html>

P.D.: corrijo el código del #2. La clase tiene que ir en el enlace, no la imagen del enlace.
__________________
Por una web con mucho estilo
+++ CUENTA ABANDONADA. ¿la quieres? +++