php menu horizontal and vertical

nascent1
nascent1 used Ask the Experts™
on
I can't figure out how to get both a horizontal menu (showing main cats) and a vertical menu (showing sub cats) on the same page. What I need is what is commonly found on websites ... where when the link in the horizontal menu is active, the associated sublinks/menu of that category shows in the menu running vertically at the side of the page. How is the best way to do that? Is it simply done using css or is it done with php somehow? (I don't need info on actually styling the links ... it's just the set up of them both horizontally and vertically that I'm not getting.)
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Dave BaldwinFixer of Problems
Most Valuable Expert 2014

Commented:
That's normally done in CSS and javascript.  Javascript-Kit http://www.javascriptkit.com/ and Dynamic Drive http://www.dynamicdrive.com/ have quite a few menu scripts.

Author

Commented:
Thank you Dave ... I really don't want to use javascript as many of my users have it disabled, unfortunately. Do you know if it is possible to do using only php? for the layout, I mean.
Dave BaldwinFixer of Problems
Most Valuable Expert 2014

Commented:
PHP only works on the server to put info in the page.  There is a CSS method called the Suckerfish that doesn't require javascript.  http://www.alistapart.com/articles/dropdowns/  I've used it on one of my websites.  Works in IE6 and newer, Firefox, Safari, Chrome....

Author

Commented:
Thanks Dave. I've perhaps not explained well what it is I want to do. I don't want to use drop down lists either, if I can help it all. My user-base are disabled with cognitive and other issues and so they need to be able to see navigation very clearly and to be able to use it very easily. They often don't have the manual dexterity to be able to use drop-down lists, unfortunately.

I need a horizontal menu that lists all of the main categories.

Then the vertical navigation at the side of the page will have to list all of the subcategories of the main category chosen.

I'll try to find a site that uses this type of navigation as an example, in case I'm still not explaining it well.
Fixer of Problems
Most Valuable Expert 2014
Commented:
Even putting it in a different place is still the same technology as a dropdown.  Although if you want it on a different part of the page, it will probably have to use javascript in a 'onmouseover' or 'onclick'.  Without javascript, you will have to just make separate pages.

Author

Commented:
ok. I thought there would have been some way to output the main cats in one menu ... and tie the subcats somehow to the category that has been selected and then simply print them. Rats! Thanks for your help.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial