Web Hosting CSS & Stylesheet Forums

Add Me

User Name
Password
Go Back   CSS & Stylesheet Forums > CSS Forumz: Main > Style Sheet In General

Welcome to the CSS & Stylesheet Forums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.
Tags:



Reply
  #1 (permalink)  
Old 10-01-2008, 07:59 AM
Stan Brown
Guest
 
Posts: n/a
Diggs:
Default Fixed "frame" at top, main text doesn't flow under it



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/200..._wont_help_you
Reply With Quote


Sponsored Links
  #2 (permalink)  
Old 10-01-2008, 07:59 AM
Ben C
Guest
 
Posts: n/a
Diggs:
Default Re: Fixed "frame" at top, main text doesn't flow under it

On 2008-09-30, Stan Brown <the_stan_brown@fastmail.fm> wrote:
> 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?


You don't need to do position: fixed. Divide the page up with absolutely
positioned divs and make each of them overflow: scroll.

This kind of thing:

.frame
{
position: absolute;
left: 0;
right: 0;
overflow: scroll;
--
.top
{
top: 0;
height: 4em;
--
.main
{
top: 4em;
bottom: 0;
--

....

<div class="frame top">
</div>

<div class="frame main">
</div>
Reply With Quote


  #3 (permalink)  
Old 10-01-2008, 07:59 AM
dorayme
Guest
 
Posts: n/a
Diggs:
Default Re: Fixed "frame" at top, main text doesn't flow under it

In article <slrnge52g5.4gn.spamspam@bowser.marioworld>,
Ben C <spamspam@spam.eggs> wrote:


> > 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.
> >

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

>
> You don't need to do position: fixed. Divide the page up with absolutely
> positioned divs and make each of them overflow: scroll.
>
> This kind of thing:
>
> .frame
> {
> position: absolute;
> left: 0;
> right: 0;
> overflow: scroll;
> --


Nice idea Ben...

<http://dorayme.890m.com/alt/pseudoFrames.html>

--
dorayme
Reply With Quote


  #4 (permalink)  
Old 10-01-2008, 04:21 PM
Ben C
Guest
 
Posts: n/a
Diggs:
Default Re: Fixed "frame" at top, main text doesn't flow under it

On 2008-09-30, dorayme <doraymeRidThis@optusnet.com.au> wrote:
> In article <slrnge52g5.4gn.spamspam@bowser.marioworld>,
> Ben C <spamspam@spam.eggs> wrote:
>
>
>> > 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.
>> >

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

>>
>> You don't need to do position: fixed. Divide the page up with absolutely
>> positioned divs and make each of them overflow: scroll.
>>
>> This kind of thing:
>>
>> .frame
>> {
>> position: absolute;
>> left: 0;
>> right: 0;
>> overflow: scroll;
>> --

>
> Nice idea Ben...
>
><http://dorayme.890m.com/alt/pseudoFrames.html>


What does height* mean? I had a look at view source and saw it there.

Maybe it's a typo and that's why you also set background: #fcc on body.

Using that #fifth link is a nice idea-- you couldn't do that with
frames.
Reply With Quote


  #5 (permalink)  
Old 10-01-2008, 04:21 PM
dorayme
Guest
 
Posts: n/a
Diggs:
Default Re: Fixed "frame" at top, main text doesn't flow under it

In article <slrnge69k1.3s4.spamspam@bowser.marioworld>,
Ben C <spamspam@spam.eggs> wrote:

> On 2008-09-30, dorayme <doraymeRidThis@optusnet.com.au> wrote:
> > In article <slrnge52g5.4gn.spamspam@bowser.marioworld>,
> > Ben C <spamspam@spam.eggs> wrote:
> >
> >
> >> > 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.
> >> >

> > ...
> >> >
> >> > Is there a way to set up these pseudo-frames, or can I truly not do
> >> > it in CSS2?
> >>
> >> You don't need to do position: fixed. Divide the page up with absolutely
> >> positioned divs and make each of them overflow: scroll.
> >>
> >> This kind of thing:
> >>
> >> .frame
> >> {
> >> position: absolute;
> >> left: 0;
> >> right: 0;
> >> overflow: scroll;
> >> --

> >
> > Nice idea Ben...
> >
> ><http://dorayme.890m.com/alt/pseudoFrames.html>

>
> What does height* mean? I had a look at view source and saw it there.


Just my quick and dirty way to remove it for a moment. I forgot to
remove it. I could bot see it being necessary

>
> Maybe it's a typo and that's why you also set background: #fcc on body.
>
> Using that #fifth link is a nice idea-- you couldn't do that with
> frames.


I don't think this is quite so, you can do it in frames. You just link
to whatever#id in the target doc. Oh yes! I just remembered, you are of
the modern generation which thinks iFrames whereas I think the T model
job, real frames! <g>

By the way, the first thought that struck me in looking at OP's problem
was that he could have made fixed work (at least on FF and Safari) by
attending to backgrounds:

<http://dorayme.890m.com/alt/positionFixed.html>

But yours was more interesting.

--
dorayme
Reply With Quote


  #6 (permalink)  
Old 10-01-2008, 04:21 PM
dorayme
Guest
 
Posts: n/a
Diggs:
Default Re: Fixed "frame" at top, main text doesn't flow under it

In article <doraymeRidThis-382DA2.17561901102008@web.aioe.org>,
dorayme <doraymeRidThis@optusnet.com.au> wrote:

> bot


not

--
dorayme
Reply With Quote


  #7 (permalink)  
Old 10-01-2008, 04:21 PM
Ben C
Guest
 
Posts: n/a
Diggs:
Default Re: Fixed "frame" at top, main text doesn't flow under it

On 2008-10-01, dorayme <doraymeRidThis@optusnet.com.au> wrote:
> In article <slrnge69k1.3s4.spamspam@bowser.marioworld>,
> Ben C <spamspam@spam.eggs> wrote:
>
>> On 2008-09-30, dorayme <doraymeRidThis@optusnet.com.au> wrote:
>> > In article <slrnge52g5.4gn.spamspam@bowser.marioworld>,
>> > Ben C <spamspam@spam.eggs> wrote:
>> >
>> >
>> >> > 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.
>> >> >
>> > ...
>> >> >
>> >> > Is there a way to set up these pseudo-frames, or can I truly not do
>> >> > it in CSS2?
>> >>
>> >> You don't need to do position: fixed. Divide the page up with absolutely
>> >> positioned divs and make each of them overflow: scroll.
>> >>
>> >> This kind of thing:
>> >>
>> >> .frame
>> >> {
>> >> position: absolute;
>> >> left: 0;
>> >> right: 0;
>> >> overflow: scroll;
>> >> --
>> >
>> > Nice idea Ben...
>> >
>> ><http://dorayme.890m.com/alt/pseudoFrames.html>

>>
>> What does height* mean? I had a look at view source and saw it there.

>
> Just my quick and dirty way to remove it for a moment. I forgot to
> remove it. I could bot see it being necessary
>
>>
>> Maybe it's a typo and that's why you also set background: #fcc on body.
>>
>> Using that #fifth link is a nice idea-- you couldn't do that with
>> frames.

>
> I don't think this is quite so, you can do it in frames. You just link
> to whatever#id in the target doc. Oh yes! I just remembered, you are of
> the modern generation which thinks iFrames whereas I think the T model
> job, real frames! <g>


No I was thinking of real frames this time. I'm sure you're right and it
does work.

> By the way, the first thought that struck me in looking at OP's problem
> was that he could have made fixed work (at least on FF and Safari) by
> attending to backgrounds:
>
><http://dorayme.890m.com/alt/positionFixed.html>


Yes that works too, and means you get to scroll the main "frame" with
the proper viewport scrollbar. But quite jerky in Firefox because their
implementation of position: fixed is crap.
Reply With Quote


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 09:50 PM.
Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.




Inactive Reminders By Mished.co.uk