
05/07/2007, 10:13
|
| | Fecha de Ingreso: julio-2007
Mensajes: 3
Antigüedad: 17 años, 8 meses Puntos: 0 | |
Re: Establecer posicion variable de DIV y para hacerlo en ie6 se utiliza javascript
//begin:javascript Fixed
// mueve el texto cuando se usa el scroll
function positionFixed(){
var pos = (document.body.scrollTop)?document.body.scrollTop: document.documentElement.scrollTop;
document.getElementById("textFixed").style.top = parseInt(pos + 35) + "px";
}
//le dice al onscroll que debe hacer
function setPositionFixed(){
// DOM but not Mozilla
if(document.getElementById && !window.getComputedStyle){
document.getElementById("textFixed").style.positio n = "absolute";
window.onscroll = positionFixed;
}
}
//detecta en cual explorador se esta viendo la pagina
function detectStyle() {
if (typeof document.body.style.maxHeight != "undefined") {
// IE 7, mozilla, safari, opera 9
} else {
// IE6, older browsers
setPositionFixed();
}
}
//end:javascript Fixed
saludos a todos espero que alguien le pueda servir
Última edición por jimmy.villalobos; 05/07/2007 a las 10:29 |