Ver Mensaje Individual
  #4 (permalink)  
Antiguo 29/03/2005, 09:40
Avatar de KarlanKas
KarlanKas
Moderador extraterrestre
 
Fecha de Ingreso: diciembre-2001
Ubicación: Madrid
Mensajes: 6.987
Antigüedad: 23 años, 4 meses
Puntos: 61

Pensando en tu problema he hecho este ejemplo de manejo de imágenes:

Código PHP:
<html>
<
head>
    <
title>Untitled</title>
    <
script>
    var 
x=null;
    var 
y=null;
    var 
proporcion;
    function 
redimension(){
    if(!
x){
    
x=document.images[0].width;
    
y=document.images[0].height;
    
proporcion=x/y;
    }
    
    
x-=5*proporcion;
    
y-=5;
    
document.images[0].width=x;
    
document.images[0].height=y;
    if(
y>0){
    
setTimeout('redimension()',100)
    }
    }
    
</script>
</head>

<body>
<img src="http://www.karlankas.net/chufa2.jpg" onload="redimension()">


</body>
</html> 
Para hacer lo que quieres, tal vez te sirva:
Código PHP:
<html>
<
head>
    <
title>Untitled</title>
    <
script>
    var 
x=null;
    var 
y=null;
    var 
proporcion;
    function 
redimension(){
    
y=(screen.availHeight/2)-20;
    
x=(screen.availWidth/2)-20;
    for(
a=0;a<document.images.length;a++){
    
document.images[a].width=x;
    
document.images[a].height=x;
    }
    }
    
</script>
</head>

<body onResize="redimension()" onLoad="redimension()">
<img src="http://www.karlankas.net/chufa2.jpg"><img src="http://www.karlankas.net/chufa2.jpg"><br>
<img src="http://www.karlankas.net/chufa2.jpg"><img src="http://www.karlankas.net/chufa2.jpg">


</body>
</html> 
__________________
Cómo escribir

No hay pregunta tonta, sino tonto que quiere seguir en la ignorancia.