Submenu

Allied77

Beginner

Posts: 40

3+ Months Ago

Hey all,

more questions from me

Looking for a submenu from my website. One that will show the sub menus on a mouse click and keep them there til the the next one is clicked(i.e. not dissapear if you move the mouse down the screen). anyone know what kind of menu I need? It'll go into the black bar under the main menu here: http://hem.bredband.net/allied/index2.htm

Is there a way to do this in css or do I need a javascript for it?

thanks!

neksus

Mastermind

Posts: 2193

Loc: Canada

3+ Months Ago

You'll need to use javascript. CSS doesn't have an onClick attribute, only hovers.

Allied77

Beginner

Posts: 40

3+ Months Ago

neksus yer like my personal Mr. Miyagi

Thanks once again for helping me out!

Will search one out!

neksus

Mastermind

Posts: 2193

Loc: Canada

3+ Months Ago

No problem The easiest way is going to be to have your link do a state change on the menu you want displayed when the parent button is pressed, and use the CSS display:none/display:inline to either show it or hide it.

Allied77

Beginner

Posts: 40

3+ Months Ago

So find a js that'll handle a state change, then do the rest in css?

neksus

Mastermind

Posts: 2193

Loc: Canada

3+ Months Ago

I've PMed you some more relevant info

Bogey

Genius

Posts: 8488

Loc: USA

3+ Months Ago

http://www.javascriptkit.com/script/scr ... ltab.shtml

That thing does what you want. It does it onmouseover thing but it stays and doesn't change if you move your mouse down... THe CSS for it is already provided in there... all you have to do is edit it a bit.

Allied77

Beginner

Posts: 40

3+ Months Ago

Thanks to you both! Totally sorted on that now!

Bogey

Genius

Posts: 8488

Loc: USA

3+ Months Ago

No problem Glad you got it figured out

neksus

Mastermind

Posts: 2193

Loc: Canada

3+ Months Ago

I sent him a link that was pretty much what he was looking for - now he'll just have to position his divs

Bogey

Genius

Posts: 8488

Loc: USA

3+ Months Ago

Why not share it as others may need the same fix? Unless it's private...

neksus

Mastermind

Posts: 2193

Loc: Canada

3+ Months Ago

It's not really private, it was just a reference to another site.http://www.garryschriml.com for those interested

Bogey

Genius

Posts: 8488

Loc: USA

3+ Months Ago

neksus wrote:

It's not really private, it was just a reference to another site.http://www.garryschriml.ca for those interested