Click to See Complete Forum and Search --> : creating a drop down menu for a loop


numerical25
08-18-2008, 07:17 PM
Im trying to create a drop down menu for a menu that will be looped out of an array. My only problem is its hard to align each drop down with the correct category. Does anyone know of any css or anything that could possibly help me.

efficacious
08-18-2008, 11:30 PM
i'm afraid i'd need some more specific detail then that to help you.. maybe even some Screen shots would be nice..

but atleast need to see some code.

Weedpacket
08-19-2008, 05:18 AM
You're going to have to be a bit more explicit. You may know what you're talking about, but imagine that we aren't sitting at your computer looking at your page and see just how much of what you just said needs further explanation.

Weedpacket
08-19-2008, 07:51 AM
Duplicate threads merged.

numerical25
08-19-2008, 09:20 AM
I dont have any code actually. Im just looking for a straight answer. But What I am trying to say is this.


Imagine Creating a horizontal menu. Your code grabs a list of categories and then does a foreach for each category. now you have something like this

HOME CONTACT US PRODUCTS MORE STUFF

Now above is your horizontal menu that you grabbed from your database.

I want to create a drop down menu foreach category that has a sub category

NOW the code doesnt necessarily have to be PHP. It can be CSS, javascript, OR whatever I dont care. I just need a method on how to create a drop down menu for this type of situation because the MENU is dynamic. It can get shorter or longer. So how can I create a dyname drop down box that can match up with its parent class.

In conclusion my problem is just creating a drop down box that can align up with its parent class. I do have some CSS im using right now to do it but it doesnt work well in IE6. so I need a better method that works. can anyone help me with that..

So actually Im just asking does anyone have a method of how to create a dynamic drop down box that can align up correctly with its parent category that they would like to share. Cause I find it very hard to do so in a dynamic perspective that is.

Weedpacket
08-20-2008, 03:50 AM
I find Stu Nicholl's (http://www.cssplay.co.uk) site useful. A decently-designed dropdown menu system shouldn't have to worry about whether the menu has five items or six, or if the first word is long or short, or if the user has poor eyesight and scaled all the text up 200%.

As always, keep the separation of server and client in mind. This is the sort of thing that the server should never have to concern itself with.