469,347 Members | 14,230 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,347 developers. It's quick & easy.

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

May 17 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Paul Trautwein | last post: by
6 posts views Thread by Marie ALHOMME | last post: by
6 posts views Thread by Mason A. Clark | last post: by
4 posts views Thread by Peter Fjelsten | last post: by
5 posts views Thread by Ted Mayett | last post: by
5 posts views Thread by marek jedlinski | last post: by
2 posts views Thread by hq105862 | last post: by
2 posts views Thread by Eric Lindsay | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.