-
Freeze top of html page
I have an html page containing a long body of text. I have a row of bookmark links at the top to help the user find relevant information. What I would like to do is freeze the top of the page, including the links and just scroll the body of text. That way the user can still use the links even when in the middle of the text. How can I do this?
-
Look in to position:fixed; and try Googling "sticky header css".
If you need more help, please provide more information and a link to your page.
-
latrobe, this does not answer your question, but an alternate way to set up the page would be to have a "table of contents" at the top of your page. Divide the text content of your page into segments. Each segment would have a segment header correspoinding to the table of contents entry. At the bottom of each segment you can have a "return to top" tag, to let the user easily return to the table of contents.
A.
-
Thanks beverleyh for the hints. I found some good sites and have got my page working - no mean feat with the background, menu and top of page to coordinate. The most difficult part was to adjust the bookmarks so that the correct part of the page showed at top of the scrolling section.
Marian, I had already done that but wanted something a bit slicker.