Results 1 to 2 of 2

Thread: Fixed position in IE 6

  1. #1
    Join Date
    Feb 2008
    Posts
    42
    Thanks
    0
    Thanked 13 Times in 13 Posts

    Smile Fixed position in IE 6

    Edit: This post was moved from:

    http://www.dynamicdrive.com/forums/s...ad.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:

    Code:
    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...
    Last edited by jscheuer1; 10-20-2008 at 10:10 PM. Reason: Post moved from similar thread

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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/s...84&postcount=2

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

    http://www.dynamicdrive.com/forums/s...69&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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •