Click here to get back home

scrolling only part of a window

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
scrolling only part of a window Andy Fish 10-15-2004
Posted by Andy Fish on October 15, 2004, 10:57 am
Please log in for more thread options
Dear HTML gurus

In a single HTML page I have a section at the top that I want to remain in
place while the rest of the content scrolls. Most importantly, I don't want
the scrollbar to be drawn in the top sectiob. The effect I'm looking for is
the same as frames but without using frames.

I have tried a <div style="overflow:auto"> for the bottom section - this
gives the right effect but only if the height of the div is specified
explicitly. I want the div to take up all the remaining space in the window.

I have also tried to position the top section with absolute positioning but
it still seems to scroll with the bottom section.

any clues please? I'm sure there must be a simple solution

TIA

Andy




Posted by Rijk van Geijtenbeek on October 15, 2004, 1:31 pm
Please log in for more thread options
wrote:

> Dear HTML gurus
>
> In a single HTML page I have a section at the top that I want to remain
> in place while the rest of the content scrolls. Most importantly, I
> don't want the scrollbar to be drawn in the top sectiob. The effect I'm
> looking for is the same as frames but without using frames.
>
> I have tried a <div style="overflow:auto"> for the bottom section - this
> gives the right effect but only if the height of the div is specified
> explicitly. I want the div to take up all the remaining space in the
> window.

'remaining window space' is not a very CSS-friendly concept.

> I have also tried to position the top section with absolute positioning
> but it still seems to scroll with the bottom section.

Easy enough with CSS 2, if only MSIE would support it:

[div class=top] top stuff [/div]
[div class=other] other stuff [/div]

body {margin:0; padding: 0;}
div.top {position: fixed; height: 5em; top: 0; left: 0; right: 0;}
div.other {margin-top: 5em;}


You can get MSIE 6 to do something that works the same, and falls back OK
in MSIE 5:
see http://devnull.tagsoup.com/fixed/

--
Rijk van Geijtenbeek

The Web is a procrastination apparatus:
It can absorb as much time as is required to ensure that you
won't get any real work done. - J.Nielsen



Posted by Andy Fish on October 15, 2004, 1:37 pm
Please log in for more thread options

> wrote:
>
>> Dear HTML gurus
>>
>> In a single HTML page I have a section at the top that I want to remain
>> in place while the rest of the content scrolls. Most importantly, I
>> don't want the scrollbar to be drawn in the top sectiob. The effect I'm
>> looking for is the same as frames but without using frames.
>>
>> I have tried a <div style="overflow:auto"> for the bottom section - this
>> gives the right effect but only if the height of the div is specified
>> explicitly. I want the div to take up all the remaining space in the
>> window.
>
> 'remaining window space' is not a very CSS-friendly concept.
>
>> I have also tried to position the top section with absolute positioning
>> but it still seems to scroll with the bottom section.
>
> Easy enough with CSS 2, if only MSIE would support it:
>
> [div class=top] top stuff [/div]
> [div class=other] other stuff [/div]
>
> body {margin:0; padding: 0;}
> div.top {position: fixed; height: 5em; top: 0; left: 0; right: 0;}
> div.other {margin-top: 5em;}
>
>
> You can get MSIE 6 to do something that works the same, and falls back OK
> in MSIE 5:
> see http://devnull.tagsoup.com/fixed/
>

Thanks for the quick reply. Unfortunately this doesn't seem to really do
what I want.

in both the standard version and the IE version, the top stuff seems to be
floating over the other stuff, so the scrollbar is the full height of the
window and scrolls the other stuff underneath (in z order) the top stuff.

I'm trying to achieve something that looks the same as a frame, so the
scrollbar is only the height of the other stuff

Andy


> --
> Rijk van Geijtenbeek
>
> The Web is a procrastination apparatus:
> It can absorb as much time as is required to ensure that you
> won't get any real work done. - J.Nielsen
>




Similar ThreadsPosted
creating a scrolling and non-scrolling area on the page November 10, 2006, 10:12 am
How do I pass a list of arguments from a popup window to the parent window? July 6, 2006, 4:49 am
and scrolling September 11, 2004, 10:28 pm
Is horizontal scrolling okay? December 28, 2004, 2:52 pm
iframe scrolling problem December 1, 2004, 5:11 am
Keyboard scrolling in web pages? February 5, 2005, 9:21 am
Multiple frames and scrolling? April 26, 2006, 7:38 am
advanced scrolling marquee July 12, 2006, 11:41 am
prevent horizontal scrolling February 5, 2008, 10:47 pm
Scrolling .jpeg picture in HTML? August 10, 2004, 6:26 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap