> I just found my SOURCE today and thought I would pass it along. The O'Reilly
> "CSS Cookbook" by Christopher Schmitt. It's in Chapter 3: Links and
> Navigation and here is called 'Creating Collapsible Menus' (pp 78-80).
> http://www.oreilly.com/catalog/cssckbk/
> 
> There is a zip available of code and I think the example is there.
> 
> Additional comment: Chris was right to correct my comment that implied short
> JavaScript was 'better'. As he so well stated, short really has nothing to
> do with "better" or not. I meant that I used one that had much less JS
> involved.

Which might be even worse. With JavaScript I can delay the hiding of
sub elements, I can set a state that doesn't change, and it works in
every browser that supports the DOM and event handlers (which includes
all major ones since their third generation). I can make the menus
collapse and expand with a mouse and a keyboard or  I can even offer
the option not to collapse the menu - something I can only do with CSS
with an extra style sheet.

With CSS I have to hack around (with JS or JScripts in HTCs) to make
MSIE behave, I have no way of keeping the state and I cannot make the
menu work with a keyboard (unless the browser in use supports :focus
and :active).

However, CSS menus are sexier as they are newer :-) Eric pointed all
these issues out in his book, sadly enough a lot of CSS tutorials
reiterating some of his ideas fail to mention them.

CSS menus are easier to maintain for the developer, hybrid JS/CSS
menus with all the styling in the CSS are both maintainable and work
for a lot bigger user group.
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to