Fixed "frame" at top, main text doesn't flow under it

Giganews Newsgroups
Subject: Fixed "frame" at top, main text doesn't flow under it
Posted by:  Stan Brown (the_stan_bro…@fastmail.fm)
Date: Tue, 30 Sep 2008

I've searched Google and the group archives, and came up empty, but
maybe I just haven't selected the right search term.

This concerns only the screen -- printing isn't an issue.  I'm also
not concerned about the appearance of the page in IE6 as long as the
page is still usable.

I want to have two pseudo-frames, using only CSS and no JS.  The top
"frame", 4em high, is a menu, and I want it to stay at the top of the
viewport.  The rest of the page is the text.  The menu items all
point to various anchors, <h2 id-...> and similar, in the page.

I've got the menu in place using position:fixed.  And using a
padding-top, I have the text starting below the menu. But as soon as
I scroll the text it slides under the menu, and when I click a link
in the menu the anchor text is a the top of the viewport, under the
window.

Is there a way to set up these pseudo-frames, or can I truly not do
it in CSS2?

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
                                http://OakRoadSystems.com/
HTML 4.01 spec:http://www.w3.org/TR/html401/
validator:    http://validator.w3.org/
CSS 2.1 spec:  http://www.w3.org/TR/CSS21/
validator:    http://jigsaw.w3.org/css-validator/
Why We Won't Help You:
  http://diveintomark.org/archives/2003/05/05/why_we_wont_help_you

Replies