View Single Post
Old 11-14-2012, 10:33 PM   PM User | #10
lesk
New to the CF scene

 
Join Date: Nov 2012
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
lesk is an unknown quantity at this point
thanks for the link, will check it out.

I have this now:

Code:
$(window).scroll(function(){
    if  ($(window).scrollTop() > 400){
         $('#servicediv').css({position:'relative',top:400});
    } else {
         $('#servicediv').css({'top':30%});
        }
});
It basically does what I want it to do. BUT the div that scrolls up ends after the text. I have a large bg image that cover up the site. but when the div scrolls up you can see that the image is revealed behind it. I dont know how to fix this. If I have height : 100% on the div it just scrolls upp way to much.

And I dont know what height to set because on other resolution it will look weird.

Any good advice? I think it still has to do with my script
lesk is offline   Reply With Quote