...

View Full Version : Flex Menu Css Question



stanleyc
07-01-2010, 02:38 PM
I have posted this on here before but still haven't been able to get this to work. I have a dhtml flex menu and have several links to schedules on there. For example I have a department called haz-mat and then when you hover over that a menu flies out that has all of the months in the year, what I would like to do is highlight the current month or make the font color of the current month in that list different than the rest. Any help would be greatly appreciated.

Thanks

Chris

Rowsdower!
07-01-2010, 08:45 PM
I have posted this on here before but still haven't been able to get this to work. I have a dhtml flex menu and have several links to schedules on there. For example I have a department called haz-mat and then when you hover over that a menu flies out that has all of the months in the year, what I would like to do is highlight the current month or make the font color of the current month in that list different than the rest. Any help would be greatly appreciated.

Thanks

Chris

HTML is not a "smart" language. You can't script with it, you just display data.

What really powers a "DHTML" page is the javascript. If you've been posting this request in the HTML/CSS forum then it's not surprising that nobody has given you a solution.

You need to create a javascript function that gets the current date and then highlights the months in the menu system accordingly. I would give each month a class ("jan", "feb", "mar", etc.) and then have the script find all members of that class and append a second class ("current_month" or somesuch). Then, the CSS file would contain the highlighting CSS for that class.

In particular, you need to brush up on the javascript date() (http://www.w3schools.com/jsref/jsref_obj_date.asp) object and getElementsByClassName() (http://javascript.about.com/library/bldom08.htm) function.

Ask a moderator to move this thread into the javascript forum for better results (do not cross-post :thumbsup:).



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum