benn600 Posted June 26, 2008 Share Posted June 26, 2008 I have a div that is positioned fixed, with some IE fix CSS. It is positioned about 150 pixels from the top and remains there as the page is scrolled. What would be the most elegant, simplest way to have this box scroll up to the top of the browser window and then remain in place? The problem is that this box, solid black (with select drop down contents) does not span to the top of the page so when users scroll down, the content is seen below and above the box. The fixed box should float up to the top of the window. CSS only would be preferred, obviously! To get around the fixed position issue, I created two divs with one absolutely positioned and the other fixed. Then, I used some body / html manipulation to clean it up and it works great in both IE & Firefox. Thanks. Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted June 26, 2008 Share Posted June 26, 2008 you will need to use javascript to do this.... you will need to check the current scroll position and alter the top position value based on the scrolling of the document. this is made easier by the fact that you want top = 150 when page scrolling is 0 and 0 when page scrolling is 150... holla back if you need the code to do it Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.