scroll - CSS Semi-fixed Element - follow-up question -


this follow-on question thread: css semi-fixed element?

i implemented kelso's solution , works on firefox , chrome. however, ie 8 not playing ball.

i have rolled code out can see problem having on live website: gran via hotels

ie listening scroll events not moving div user scrolls down page. seems though following line not doing in ie:

d.css({ position: "fixed", top: "0px"   }); 

the first line evaluating -2 in ie whereas in firefox it's 377.

var scrollertopmargin = $("#scroll-container").offset().top; 

i no css expert , have been pulling hair out on this. there must simple solution! please help!

thanks ben

ie not doctype , running quirks mode activated. why not work.

try 1 , see if works:

<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> 

Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -

PostgreSQL 9.x - pg_read_binary_file & inserting files into bytea -