PDA

View Full Version : Help With HTML



Polyonymous
07-21-2004, 09:38 PM
im having trouble with the site im makeing, i have a lits for the table of contents (a long list) and i was wondering if anyone knew how to change the list from this

<ol>
<li>hi
<li>hi again
<ul>
<li>hello
<li>how are you
</ul>
<li>this is the end almost
<ul>
<li>yes
</ul>
</ol>
change so it looks like

<ol>
<li>hi
<li>hi again
<li>this is almost the end
</ol>

but when you click on "hi again" it will bring down the others (hello, how are you) below it. i hope you understand what im saying

GrimmReaper
07-21-2004, 09:54 PM
i see. you cant do that normally with html, without loading another page, but to do that without loading the actual page your looking at, you'd need an ilayer, or iframe somewhere in there ( i use iframe mostly, layers are too jobbly)

but to do the effect your talking about, you need javascript. It should'nt require a whole lot, you could probably find some at the javascriptsource.com or something along those lines.

Dr Unne
07-21-2004, 10:38 PM
You can do it with CSS, sort of. CSS lets you specify :hover on any element, and you can use that to create dropdown menus; specify display:none for an element, and display:block for that element when you :hover its parent. Amazingly enough, IE doesn't support that.

You can also use Javascript. Take a look at http://www.destroydrop.com/javascripts/tree/