Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jul 2008
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Flex Menu Css Question

    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

  • #2
    Senior Coder Rowsdower!'s Avatar
    Join Date
    Oct 2008
    Location
    Some say it's everything.
    Posts
    2,027
    Thanks
    5
    Thanked 397 Times in 390 Posts
    Quote Originally Posted by stanleyc View Post
    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() object and getElementsByClassName() function.

    Ask a moderator to move this thread into the javascript forum for better results (do not cross-post ).
    The object of opening the mind, as of opening the mouth, is to shut it again on something solid. –G.K. Chesterton
    See Mediocrity in its Infancy
    It's usually a good idea to start out with this at the VERY TOP of your CSS: * {border:0;margin:0;padding:0;}
    Seek and you shall find... basically:
    validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •