473,605 Members | 2,590 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

scrolling only part of a window

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
Jul 23 '05 #1
2 6081
On Fri, 15 Oct 2004 09:57:20 GMT, Andy Fish <aj****@blueyon der.co.uk>
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

Jul 23 '05 #2

"Rijk van Geijtenbeek" <ri**@operaremo vethiz.com> wrote in message
news:op******** ******@news.ind ividual.net...
On Fri, 15 Oct 2004 09:57:20 GMT, Andy Fish <aj****@blueyon der.co.uk>
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

Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
16675
by: Midas NDT Sales | last post by:
I have been looking at a simple example of a scrolling text box (the one in the SAM book) as below: <script language="JavaScript"> var pos=100; function Scroll() { if (!document.getElementById) return; obj=document.getElementById("thetext"); pos -=1; if (pos < 0-obj.offsetHeight+130) return;
4
19571
by: mr_burns | last post by:
Hi, Is it possible to disble horizontal scrolling using CSS? I want to try and use two backgrounds, one tiling vertically and part of the body background, which will not force scrolling, but one that will be part of a table stretching of to the right, which will force unwanted horizontal scrolling. How is this written in the stylesheet? Cheers Burnsy
3
4677
by: Vikram Bhatia | last post by:
1. Is there an event to capture scrolling using mouse wheel in Netscape 6.x? 2. When arrow keys are used to scroll a page in Netscape 6.x, the scrolling offsets obtained using 'window.pageXOffset' and 'window.pageYOffset' are not correct. Is there any other way to get the correct scrolling offsets?
14
5409
by: Dave | last post by:
My web site is not particularly theme-based, but it contains an Art Gallery I'd like to display in a different perspective. I would like to horizontally scroll it, rather than vertically - as if the viewer is virtually "walking" through the gallery. I'm just attempting this to have this part of the page be different. Is horizontal scrolling okay, or will it throw our browsers into chaos and viewers into insanity? If horizontal scrolling...
2
3826
by: James CC | last post by:
I have a strange bug in C# using windows forms. To make sure it's not some bug with my code, I've gone back to a simple test app, and still see the same behavior. I have created a simple C# Windows MDI Application, as in MSDN, ie : 1) Create Windows Application (Form1), set IsMDIContainer to true 2) Create MainMenu component in the form, with top level '&File', submenu '&New' and '&Close', and another top level '&Window' with MDIList...
4
9041
by: Lars Netzel | last post by:
I have a long list of Items in a ListView... if I scroll down to something that is not visible without scrolling and then click on it I open another window where you can work with the details of that item.. Then I close that window I repopulate the ListView to reflect some changes make in the details window.. and I re-set the selected Row after the population of the ListView so the item I was working on is selected again.. but then the...
2
2955
by: P2P | last post by:
Hi I am wondering if someone know of a free cross-browsers vertical scrolling script that - is cross cross-browsers - will call the scrolling content from an external html page or from a url page
4
7766
by: Keith Bentrup | last post by:
Hi all, I wrote a simple search function to find text in a textarea where not all the text is visible (ie. the text box displays 10 lines but there may be more than 1000 lines to search). I can find the text and select it using the function below, BUT I can't figure out how to have the textarea automatically scroll to the selection in Firefox. Any ideas or suggestions? function search(needle,haystack,start) { var element =...
2
8404
by: Andy Fish | last post by:
Hi I have quite a simple requirement. at the top of a page I would like to have a fixed-height area (which will be used as a "toolbar") and the main the content will be in the bottom part whch needs to occupy the rest of the window and scroll of necessary. so the behaviour i'm looking for is similar to having 2 frames but all in one page. the following works fine in IE but not in firefox:
3
11731
by: Chamnap | last post by:
Hello everybody, I have one problem. I want to do something after the user finished scrolling. The scroll event fires whenever the user is scrolling. I don't want this actually. Does anyone has any idea or trick of how to achieve this? Appreciate your ideas..... Thanks Chamnap
0
8004
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8425
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8288
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6743
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5886
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5445
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3912
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3958
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1541
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.