D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] OT: Drop-down menus in webpages

 

At Tue 06 Jan 2009 19:45:50 UTC, Grant Sewell <dcglug@xxxxxxxxxxxx> wrote:

> I am putting together a simple html webpage but I'd like my menu across
> the top to have a couple of drop-downs.
>
> Most of the sites I've looked at seem to want to create "combo box"
> style objects on the page with a "Go" button... I'm looking for
> something simple that uses the mouse-hover thing so when a user moves
> their mouse over the primary menu object the menu list drops down ready
> for the user to select one of the list items.
>
> Am I right in thinking that the easiest way to get this to work is with
> Javascript?  (I don't want to re-write everything in
> php/perl/python/whatever.)
>
> Has anyone got any good examples that I can use?

You don't need JavaScript (except for IE compatibility) --- you can do  
it all with CSS. I wrote an article on this a couple of years ago:

http://www.justsoftwaresolutions.co.uk/articles/css_menus.html

There's a sample menu at

http://www.justsoftwaresolutions.co.uk/articles/sample_menu.html

Anthony
-- 
Anthony Williams
Author of C++ Concurrency in Action | http://www.manning.com/williams
Custom Software Development | http://www.justsoftwaresolutions.co.uk
Just Software Solutions Ltd, Registered in England, Company Number 5478976.
Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL, UK



-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html