I found this website today http://www.forward-thinker.co.uk/. Does anyone know how to make a sticky header like this.?
I found this website today http://www.forward-thinker.co.uk/ . Does anyone know how to make a
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
That particular site utilizes jQuery’s
$(window).scrollevent. It checks if the top of the scrolled-to area ($(this).scrollTop();) is below a certain height. If so, it adds to css of the header a class containingposition:fixed(it also changes its height, since only part of the header scrolls). If the scrolled-to area is nearer to the top, the script removes the class containingposition:fixedfrom the header’s css and changes the height back to its original value.