Designing Fixed Position Sidebars

R

Roger

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
 
S

scripts.contact

Roger said:
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.body.offsetHeight<sidebar.offsetHeight)
alert(sidebar.offsetHeight-document.body.offsetHeight)


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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top