Grow your CSS skills. Land your dream job.

perhaps a stupid question

  • # January 14, 2010 at 10:31 pm

    Perhaps another stupid question.
    is there a psuedo class for the current page?

    for my links I am using
    a:link
    a:visited
    a:hover
    a:active

    Is there one for the current page?

    Thanks

    # January 15, 2010 at 11:53 am

    No, this is something that you have to do manually by applying classes to your navigation.

    Here’s a great way of doing it by placing a class on the body tag:

    http://css-tricks.com/id-your-body-for- … ecificity/

    # January 17, 2010 at 3:42 pm

    TheDoc is absolutely right, but it is kinda interesting… I don’t think HTML *SHOULD* be able to know about the "current" page, but JavaScript or PHP could figure it out. might make a cool article someday.

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

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".