Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS perhaps a stupid question

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #27562
    kloy
    Member

    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

    #69508
    TheDoc
    Member

    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:

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

    #69584
    Chris Coyier
    Keymaster

    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)
  • The forum ‘CSS’ is closed to new topics and replies.