Ver Mensaje Individual
  #2 (permalink)  
Antiguo 07/04/2006, 05:56
Avatar de KarlanKas
KarlanKas
Moderador extraterrestre
 
Fecha de Ingreso: diciembre-2001
Ubicación: Madrid
Mensajes: 6.987
Antigüedad: 23 años, 3 meses
Puntos: 61
Me he entretenido haciendo esto:

Creas un frameset en la página index.html:
Código:
<!-- frames -->
<frameset  id="pepe" cols="30%,*">
    <frame name="pequeño" src="2.html" marginwidth="10" marginheight="10" scrolling="auto" frameborder="0">
    <frame name="grande" src="1.html" marginwidth="10" marginheight="10" scrolling="auto" frameborder="0">
</frameset>
Luego creas la página 2.html que va en el lado izquierdo:

Código:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html>
<head>
<title>Untitled</title>
</head>

<body bgcolor="red">



</body>
</html>
y la 1.html que va en la parte grande:

Código:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html>
<head>
<title>Untitled</title>
<script>
function cambiar(esto){
s=esto.value=="Quitar";
destino=(s)?0:30;
incremento=(s)?-1:1;
origen=(s)?30:0;
esto.value=(s)?"Poner":"Quitar";
mover(origen,destino,incremento);
}
function mover(origen,destino,incremento){
origen+=incremento;
top.document.getElementById('pepe').cols=origen+'%,*'
if(origen!=destino){
o=origen;
d=destino;
i=incremento;
setTimeout("mover(o,d,i)",50);
}




}
</script>
</head>

<body>
<input type="button" onclick="cambiar(this)" value="Quitar">


</body>
</html>
Junto todo queda así.

Espero que te sirva!
__________________
Cómo escribir

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