PDA

View Full Version : Fixed position in IE 6



zaphod42
10-20-2008, 07:53 PM
This post was moved from:

http://www.dynamicdrive.com/forums/showthread.php?t=37800

because it was unclear to me if it was an answer or a new question. I decided it was a new question, which belongs in a new thread. See above link for the code of 'your script', referred to below.

- jscheuer1

your script looks much better than mine, but I can't seem to get it to fire in ie properly....this is what I've been stuck with for awhile:


fixPos=function(o,l,t){
if(!o){
for(i in fixedPos){
fixedPos[i].style.top=(fixedPos[i].fixedTop+(document.documentElement.scrollTop || document.body.scrollTop || 0))+'px'
fixedPos[i].style.left=(fixedPos[i].fixedLeft+(document.documentElement.scrollLeft || document.body.scrollLeft || 0))+'px'
}
}else{
fixedPos[o]=o
fixedPos[o].fixedTop=t ||0
fixedPos[o].fixedLeft=l ||0
}
}

I just set the window.onscroll event to call this function, and send each element in one time after creation to set the variable pos....this is NOT how I would prefer to do this...

jscheuer1
10-20-2008, 10:16 PM
What are you asking/saying? Is there a problem with your code, or were you having a problem with one of the demos from my post:

http://www.dynamicdrive.com/forums/showpost.php?p=166284&postcount=2

or were you referring to the original post from that thread:

http://www.dynamicdrive.com/forums/showpost.php?p=166269&postcount=1

???

In any case, please make future posts/threads clearer than the above one, as to what you asking about or saying. And if you have a new question, even if it is somewhat related to a thread from someone else, start a new thread.