views:

239

answers:

9

Hello,I need to create a menu tree using HTML. I had a search on Google, but they are providing some software to download in order to create this. But I need some script and HTML tags to do this. Can anyone help me solve this problem. Thanks in advance.

A: 

You could use JavaScript to generate the menu - for example, have a look at the plugin jQuery - Menu tree.

Justin Ethier
This isn't necessarily true, depending on what the OP is after, this may easily be a pure CSS endeavor.
Nick Craver
Good point, my answer has been updated.
Justin Ethier
+2  A: 

With a bit of javascript and a knowledge around CSS you can convert a simple UL LI list to a menu tree. its right that you can use jQuery if you understand it.

You can narrow your google search by Menu Tree using UL Li. or CSS to convert UL LI to tree.

sushil bharwani
Great! I appreciate the way you are also showing her how she could also find it herself.
Ismail
Thanks .. i believe a self search lets u learn more around the area i know i was also searching this two yrs back.
sushil bharwani
I 100% agree with you.
Ismail
@sushil bharwani! I'm surprised that you have reached this reputation in 27 days. Its almost what I achieved in 10 months :D.Its a big achievement for you. Congratulations!!!
Ismail
A: 

Navigation menus are mostly created using a combination of UL and LI.

<UL id="Menu">
    <LI>Home</LI>
    <LI>Links</LI>
</UL>

And you can insert UL inside LI element and thus get a tree structure for navigation.

Kangkan
A: 

hmm ... i am not quite sure what exactly is your problem.

so far, with html you can structur lists by using nasted ul li-tag combinations. while ul initiates a list and li a list item in it. it is allowed to use a ul tag inner a li tag ...

helle
A: 

Here is a simply way to do it if you don't want to write one yourself..

http://www.mycssmenu.com/#css-menu-demo

Mantisimo
+5  A: 

Here is something very simple to start with.

http://www.dynamicdrive.com/dynamicindex1/navigate1.htm

EDIT

Implementing what I learned from @sushil bharwani. Here is how I found the above URL i.e. at the courtesy of @sushil bharwani http://www.google.co.in/search?q=Menu+Tree+using+UL+L&amp;qscrl=1

Ismail
A: 

You might want to look into some of the online tools that builds the menu for you. E.g. CSS Menu Generator

Gert G
A: 

I am not sure if you will find your answer, but here is a list with several different types of vertical menus http://css.maxdesign.com.au/listamatic2/index.htm no javascript is involved in those examples

Wai Wong
+1  A: 

You don't need to use JavaScript (unless you want compatibility with outdated browsers), you can achieve it with HTML+CSS alone. And in a much more semantically-correct way. :)

You can make vertical dropdown menus or (prettier example) horizontal menus using the techniques explained in the Sons of Suckerfish article at HTMLDog.
Simple and meaningful.

ANeves