The following example of making a position : fixed does not work in my FF16.02 / IE9. But as far as I known, it should be crossbrowser compatible.
Any Ideas?
The following example of making a position : fixed does not work in my
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.
The problem lies in
document.body.scrollTop. That is not cross-browser compatible. Usewindow.scrollY, and it should work perfectly fine.Your code would change to this:
Demo