treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Active state on a menu item

  • How do I put an active state on a menu item?
    I've got the hover state covered, but I can't wrap my head around the active state. All I realy want to do is have the active menu item be with a font color of black.
  • By active, do you mean that the user has navigated to the page represented by the menu item? What framework are you working in?
  • "ploughansen" said:
    How do I put an active state on a menu item?
    I've got the hover state covered, but I can't wrap my head around the active state. All I realy want to do is have the active menu item be with a font color of black.


    active state is when it is clicked and only when it is clicked, so you would need to hold in the click.

    if you mean the current state, as in you want to highligh what page your in, then give your link an id and style that the way you want it

    edit: http://www.honeycomb-web.co.uk/ look at the home button, then do view>source to see what I mean by current id