Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Javascript / Client Side Development

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

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..
Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc