This is a discussion on "Css expanding menu ?" within the Web Page Design section. This forum, and the thread "Css expanding menu ? are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Css expanding menu ?
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Css expanding menu ?
hi guys ...
havnt been around here for ages... so hello to you all <waves>.. i misse dyou all Im trying to come up with a veritcal css menu that expands either on click or on hover... preferably without any javascript. Cdan anyone recomend a tutorial, as im struggling to find something that fits the bill Sorry for the short post... ill come back and say hi in the cafe properly later acc |
|
|
|
|||
|
Re: Css expanding menu ?
Hey!!
Several flyout navs here all with css. Quite a few to choose from. http://www.cssplay.co.uk/menus/ I've had good luck with this one as well. http://www.tanfa.co.uk/css/examples/menu/ |
|
|||
|
Re: Css expanding menu ?
ive had to use a little JS linda my sweety
This is because i only want them to open onclick.... js was the easiest option. It looks good... but, i have a new problem ! I have a hover and a normal and a "open" graphic for my buttons, now the normal and hover work fine, but i cant figure out how to show the "active" button when the menu is open. a:active doesnt work (didnt think it would) Any idea's? |
|
|||
|
Re: Css expanding menu ?
Yes... selected state is done like this...
|
|
|||
|
Re: Css expanding menu ?
im not sure that will work ... heres my html :
|
|
|||
|
Re: Css expanding menu ?
i think ,ill need to assign a class via javascript when the "onclick" is true... but im not sure how to do this.
|
|
|||
|
Re: Css expanding menu ?
Ah... I see... I have no experience with Javascript so hopefully someone else can help ya!
|
|
|||
|
Re: Css expanding menu ?
must be a echo command or somethign similar to php.... just not sure... rpint maybe lol... arg
|
|
|||
|
Re: Css expanding menu ?
You'll need to get the id so it only affects the menu links then loop through all of the links withing the element with that id then add an onclick event handler that sets the bg image of the clicked element to the specified image and set all the others to the standard bg image.
Alterbatively you can change the class name of the 'active' nav item using JS. You need the alternative css style in the CSS fiel already of course. You would follow the same instructions as above but would set the class name rather than the bg property. Changing the class name seems to be a lot quicker than altering the bg style so it may be your best bet. I'm actually doing something like this myself at the minute. I should be done withing the next few days. When I get it all working, I'll post up the script. It's not particularly difficult, to be honest. Pete. |
|
|||
|
Re: Css expanding menu ?
thanks mate.... my js really does suck
|
|
|||
|
Re: Css expanding menu ?
Have you ever looked at quirksmode.org? It's the home of JavaScript-god-who-is Peter-Paul Koch. It's a brilliant site and I can also recommend his book PPK on JavaScript, likewise DOM Scripting by Jeremy Keith is also excellent. They aren't particularly technical but they show you how JS works, how it should work, when to use it etc and they also provide real world example. In Keith's book you basically put a site together with loads of funky and accessible JS features. The JS Bible is pretty good for the technical stuff, there are simply too many bits and bobs to remember so this is very useful.
Anyway, I should get to work on that script. Pete. |
![]() |
| Tags |
| css |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| expanding menu | lisafelst12 | Flash & Multimedia Forum | 9 | Apr 28th, 2008 20:16 |
| Another Expanding Menu Problem | mispris006 | Web Page Design | 0 | Feb 8th, 2007 18:57 |
| expanding menu | brunette | JavaScript Forum | 3 | Dec 7th, 2006 22:56 |