Forums

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

Home Forums CSS yet another a:active problem

  • This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #43879
    yoyo
    Participant

    i have my navigation bar, the **:hover** and **:active** state must be in same style,but :active is not applied to my desired style instead a simple border is applied

    what should be problem ?

    anything wrong with my selectors ?

    check this [pen](http://codepen.io/yoyo/pen/qEHek “A:active”)

    #130626
    yoyo
    Participant

    @BenWalker

    sorry not working yet :(

    if you can update my pen

    #130713
    yoyo
    Participant

    @BenWalker

    right now there is no border, but i want the same style of the :hover effect to the :active state also

    #130739
    TheDoc
    Member

    It is.

    The `:active` state is merely the active of clicking on the link, not a ‘current page’ function that some people confuse it for. Is that happening in this case?

    #130793
    yoyo
    Participant

    @TheDoc

    ya it is….then how can i show the ‘current page’ link to be highlighted somewat ?

    **:current** ?

    #130803
    Paulie_D
    Member

    Nope.

    There are a couple of ways…the simplest way is to give each page (or ID) a separate class and each link an individual class too.

    Then you could do something like

    .page-1 .home {
    styling;
    }

    .page-2 .about {
    styling;
    }

    otherwise…javascript.

    #130815
    Kitty Giraudel
    Participant

    > **:current**

    This is a time-dimensional pseudo-class part of CSS Level 4 Selectors module representing the innermost element, or ancestor of an element, that is currently being displayed.

    It goes along with `:past` and `:future`.

    As far as I know, it’s mostly meant to help screenreaders and such things;

    #130827
    yoyo
    Participant

    @Paulie_D @HugoGiraudel

    ya i got it thanks :)

Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘CSS’ is closed to new topics and replies.