Ver Mensaje Individual
  #6 (permalink)  
Antiguo 10/07/2009, 05:59
Avatar de Adler
Adler
Colaborador
 
Fecha de Ingreso: diciembre-2006
Mensajes: 4.671
Antigüedad: 17 años, 5 meses
Puntos: 126
Respuesta: centrar imagen a la derecha de la pantalla

Hola

Después de hacer algunas pruebas, a mi me funciona en FF y IE. En ambos fija y centra la imagen a la derecha

Código javascript:
Ver original
  1. <html>
  2. <head>
  3. <style type="text/css">
  4. #fix { z-index:15000;}
  5. body > div#fix { position: fixed; right:0px; bottom:0px;}
  6. </style>
  7.  
  8. <script type="text/javascript">
  9. function fixImagen () {
  10. var alto = parseInt(((screen.height) / 2) / 2);
  11. var elem = document.getElementById("fix");
  12. elem.style.bottom = alto + "px";
  13. }
  14. window.onload = fixImagen;
  15. </script>
  16. </head>
  17. <body>
  18.  
  19.  
  20. <div id="fix">
  21. <a href="#"><img src="img.gif"/></a>
  22. </div>
  23.  
  24. </body>
  25. </html>

Suerte
__________________
Los formularios se envían/validan con un botón Submit
<input type="submit" value="Enviar" style="background-color:#0B5795; font:bold 10px verdana; color:#FFF;" />