473,811 Members | 3,701 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Designing Fixed Position Sidebars

While there are several web sites that make use of sidebars, there are
relatively few that make use of fixed position sidebars. While fixed
position sidebars offer the advantage of having the page controls and
hyperlinks always visible when the user scrolls down a page, they have
one great disadvantage: a portion of the fixed position sidebar may not
be visible for some users because of a combination of small vertical
height and the current browser font size.

I can think of two possible strategies to address the problems of fixed
position sidebars. The first is detecting the problem and displaying an
indication that there is more sidebar to be seen -- for example, display
a "More" box with a down arrow on the bottom of the sidebar when the
situation occurs.

The second strategy is giving the user some dynamic control over what is
displayed in the sidebar (Note most browsers give the users some
controls to view a bit more of a hidden sidebar through tempory use of
full screen mode (F11) or temporary reduction of font size (CTRL-)).
For example, if there are several logical sections in the sidebar, there
could be -/+ control buttons that will collapse/expand the contents of
the section thereby moving the hidden portion higher.

If there are no logical sections, another possibility is to make the
"More" box into a control that would move the the side bar higher by
making the position fixed "top" value a negative px value. A "More"
control could then be positioned at the top of the sidebar.

Finally, my questions: By running a script using <body onload =...>, is
there a way to detect that the bottom of a fixed position sidebar is not
visible or calculate/estimate the number of pixels needed to show the
hidden portion?

Are there other alternatives for dealing with the problems of fixed
position sidebars (I do not want to use frames.)?

Roger
May 17 '07 #1
1 2012
Roger wrote:
Finally, my questions: By running a script using <body onload =...>, is
there a way to detect that the bottom of a fixed position sidebar is not
visible or calculate/estimate the number of pixels needed to show the
hidden portion?
if(document.bod y.offsetHeight< sidebar.offsetH eight)
alert(sidebar.o ffsetHeight-document.body.o ffsetHeight)

Are there other alternatives for dealing with the problems of fixed
position sidebars (I do not want to use frames.)?
Use fixed height (e.g. 100%) and set overflow to auto so users can see
the scrollbar if sidebar's height is bigger than the height of body..

May 17 '07 #2

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

Similar topics

9
17720
by: Paul Trautwein | last post by:
I'm trying to get an image to float in a window despite scrolling. I've gotten it to work on my Mac using IE 5.2, Netscape, and Safari, but it goes wonky when I test it on a PC. (testing with IE only at the moment.) Positioning is wrong, and it doesn't float at all. Here's a test page: http://www.bdiusa.com/mirrors/test.html I've tested the code using the CSS Validator on the W3 site - and it said it's okay.
6
3635
by: Marie ALHOMME | last post by:
Hi everybody ! I'm new here, and I'm French, so pardon me for any and all grammar and typo mistakes ! I hope you'll understand everything anyway :) I'm working on my portfolio site, which I am completely rewriting in HTML 4. strict + CSS. In the Gallery part of the site, people can see thumbnails of my work and when they click on any work, it opens a popup (btw : I'm not here to
6
5419
by: Mason A. Clark | last post by:
Masters: On two or three-column layouts, one column often has a list of links. Scrolling the page hides them. I'm aware there's supposed to be the ability to fix the column (frame-like). I have some bits of such code but haven't yet made it work well. Question: Why have I never seen an example on the web? Not that I've seen everything, but I've seen numerous pages
4
5881
by: Peter Fjelsten | last post by:
Guys at comp.infosystems.www.authoring.stylesheets, I have designed a page in (x)HTML transitional that I am happy with in (close to) standard compliant browsers (i.e. Firebird/Opera), but IE is causing problems as can be expected since I have used position:fixed. I don't want to use too many hacks and I don't care that the page looks a bit different in IE (their loss) but I want it to be usable.
5
3468
by: Ted Mayett | last post by:
I've read a lot through the google archives, but I cannot seem to find an example... Has someone successfully made css code that allows for position: fixed to work in IE 6.0.2800? What is the url please? My partner is looking to make the top-right graphic stay in view as the reader scrolls down the page: <http://www.solitarytrees.net/trees.htm>
5
5450
by: marek jedlinski | last post by:
I've read up on CSS positioning with floats, but I don't know if I'm missing somthing simple or if I'm stretching things too far. I can put one sidebar on each side (float:left and float:right). The problem begins when I try to place more than one sidebar on each side. In IE 6 it looks OK. In Firebird/Mozilla, either the left or the right sidebars get shifted down below the point where sidebars on the other side end: ...
2
5014
by: hq105862 | last post by:
Hi, Is it possible to simulate frames behaviour with CSS? Currently, I've used CSS to create the visual look of my old framed site. For this I've used styles that place the images at absolute positions. Then I thought, if I fixed the image positions, the images will stay put and the 'body' will scroll up, like in frames.
2
9770
by: Eric Lindsay | last post by:
Googling suggests that IE7 may support position: fixed; I think this might be handy for some pages I want to do. Does anyone have any comments about whether fixed should be considered for use on new web pages? -- http://www.ericlindsay.com
1
3277
by: tehweb | last post by:
Background: I have a fixed position div on the bottom om my page. I have then added a dialog-div into this fixed position one. When I bring up the dialog, everything works if the the scrollTop is 0. I can drag it around with no problem. Problem: If the page has scrolled, lets say 100px down (y-axis) and I try to drag the dialog around, a strange effect appair in non-ie browsers. The dialog is instantly moved 100px UP while dragging. as...
0
9731
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
10651
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
10393
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9208
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
7671
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
6893
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
5697
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4342
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3871
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.