- This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
Viewing 8 posts - 1 through 8 (of 8 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
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”)
@BenWalker
sorry not working yet :(
if you can update my pen
@BenWalker
right now there is no border, but i want the same style of the :hover effect to the :active state also
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?
ya it is….then how can i show the ‘current page’ link to be highlighted somewat ?
**:current** ?
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.
> **: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;