Link to home
Start Free TrialLog in
Avatar of nascent1
nascent1Flag for Canada

asked on

php menu horizontal and vertical

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.)
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

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.
Avatar of nascent1

ASKER

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.
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....
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.
ASKER CERTIFIED SOLUTION
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.