• # March 16, 2009 at 10:58 pm

    Can anyone share with me the best way (with CSS) to have the menu button of the page you are on stay in a state that shows that is where you are. kinda like it does right on this site.


    # March 17, 2009 at 12:05 am

    I usually do it with the body ID: … e-body-id/

    # March 17, 2009 at 7:21 am

    I make a select id and add that to the link I want to highlight


    and whatever way I want my link to look like in the selected state i code for that in CSS

    #select {…]

    although the body id seems a better idea I have never used it myself

    # March 17, 2009 at 7:38 am

    This reply has been reported for inappropriate content.

    It really depends on what sort of website you have. If it’s just a few static HTML pages then the body id is the way to go.

    If you are serving up your pages dynamically with PHP then you can use something like:


    And if you are using something like WordPress then the class current_page_item is already added for you.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.