Ver Mensaje Individual
  #4 (permalink)  
Antiguo 09/07/2009, 13:50
Avatar de Adler
Adler
Colaborador
 
Fecha de Ingreso: diciembre-2006
Mensajes: 4.671
Antigüedad: 18 años, 2 meses
Puntos: 126
Respuesta: centrar imagen a la derecha de la pantalla

Hola

Prueba ahora

Código javascript:
Ver original
  1. function fixImagen () {
  2. var alto = parseInt(((screen.height) / 2) / 2); // menos la mitad del height de la imagen
  3. var elem = document.getElementById("img");
  4. elem.style.bottom = alto + "px";
  5. }
  6. window.onload = fixImagen;

Código html:
Ver original
  1. <div id="img" style="z-index:9999999; position: fixed !important; position:absolute; bottom:0; right:0px; _top:expression(eval(document.compatMode && document.compatMode=='CSS1Compat') ? document.documentElement.scrollTop + (document.documentElement.clientHeight-this.clientHeight) : document.body.scrollTop + (document.body.clientHeight-this.clientHeight));cursor:hand;cursor:pointer;">
  2. <a href="#" onclick="javascript:alert('Sign Up');">IMAGEN</a>
  3. </div>

PD: ¿Consigues fijar la imagen en IE?

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;" />