Having some problems for this to work. Help PLEEEEEEASE.
I would like the element to be attached to the top of the viewport when the user scrolls the page while staying at the top of the viewport ... easily. If the window is narrower then 960px horizontal scrollbars appear. If the window scrolls horizontally, I would like the contents inside this fixed element to scroll along with it.
Please check out the demo, the two green fields should always line up. Make your window narrow and scroll the horizon, notice how they no longer line up.
Is this possible without JavaScript? It should work in IE7 + and not completely break in IE6.
http://www.louiswalch.com/beta/t/_scrolltest4.html
source
share