Foros del Web » Programando para Internet » Javascript »

Deformación web nada más cargar la web, luego se pone bien.

Estas en el tema de Deformación web nada más cargar la web, luego se pone bien. en el foro de Javascript en Foros del Web. Buenas gente... mirar, tengo un problemilla. En la siguiente web: www.deexteriores.com , darle a entrar y luego a cualquiera de las 4 imágenes que aparecen ...
  #1 (permalink)  
Antiguo 19/04/2007, 10:06
 
Fecha de Ingreso: febrero-2007
Mensajes: 73
Antigüedad: 19 años, 7 meses
Puntos: 0
Deformación web nada más cargar la web, luego se pone bien.

Buenas gente...

mirar, tengo un problemilla.

En la siguiente web:

www.deexteriores.com, darle a entrar y luego a cualquiera de las 4 imágenes que aparecen en grande a la derecha. Como os podreís haber dado cuenta la web nada más cargar en esa sección, se deforma, y luego se recoloca. Esto seguro que es por el script que tengo montado ahi en medio que ahora os lo pego:

Estilos CSS:
Código PHP:
.st {
    
position: relative;
    
width : 598px; 
    
overflow : hidden;
} 
Archivo HTML:

Código PHP:
<div class="st" id="pasarela"> 
 </
div> 
Script js:

Código PHP:
window.onload = f_init;

var 
oDiv = null;
var 
hInt = null;
var 
nDir = 0;

function 
f_init() {
var 
nCoordX = 4;
var 
nMaxH = 0;
var 
nlDivs = document.getElementsByTagName("div");
for(
i=0; i<nlDivs.length; i++) {
var 
oDiv = nlDivs[i];
if(
oDiv.className=="st") {
oDiv.move = f_move;
for(
ii=0; ii<oDiv.childNodes.length; ii++) {
var 
oImg = nlDivs[i].childNodes[ii];
if(
oImg.tagName=="IMG") {
oImg.style.position = "absolute";
oImg.style.left = nCoordX+"px";
nCoordX += oImg.width + 12;
nMaxH = Math.max(nMaxH, oImg.height);
}
}
oDiv.scrollLeft = 0;
oDiv.maxScrollW = oDiv.scrollWidth - oDiv.offsetWidth;
oDiv.centerX = (oDiv.offsetWidth / 2);
oDiv.style.height = nMaxH+"px";
}
}
}
function 
f_mover() {
if(
hInt != null) window.clearInterval(hInt);
oDiv = this;
hInt = window.setInterval(f_move, 10);
}
function 
f_mmove(event) {
if(
event == null) event = window.event;
var 
x = event.clientX - this.offsetLeft;
if(
x < this.centerX && this.scrollLeft>0 ) nDir = -1;
if(
x > this.centerX && this.scrollLeft<this.maxScrollW) nDir = +1;
}
function 
f_mout() {
window.clearInterval(hInt);
hInt = null;
oDiv = null;
}
function 
f_move() {
oDiv.scrollLeft += nDir;
}
            
function 
flecha_mover(nn) {
if(
hInt != null) window.clearInterval(hInt);
oDiv  = document.getElementById("pasarela");
nDir=nn;
hInt  = window.setInterval(f_move, 10);
} 
Alguien sabría decirme como solucionarlo?

Muchas gracias.
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 05:44.