Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5

Thread: Active pseudo?

  1. #1
    Regular Coder
    Join Date
    Apr 2011
    Posts
    143
    Thanks
    3
    Thanked 1 Time in 1 Post

    Active pseudo?

    Hey all,

    I am trying to use an active pseudo looks like this

    Code:
    .side-nav-custom ul a:active {
         color: #00b7e5;
    }
    However, it's not working what am I doing wrong?
    Also gave it a hover pseudo and that works, but it seems I can't ever get the active pseudo to work. Am I doing something wrong?

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,637
    Thanks
    6
    Thanked 1,004 Times in 977 Posts
    What exactly isn’t working? :active is the state while the element is being clicked, i. e. while you hold your mouse button down.

  • #3
    Regular Coder
    Join Date
    Apr 2011
    Posts
    143
    Thanks
    3
    Thanked 1 Time in 1 Post
    I thought the active pseudo showed you what menu you are in?
    So say for a top nav menu color is white and has a pseudo of active and color blue, when you clicked on it and are on that page it shows that top nav menu blue. But when you click on another menu in the top nav it goes back to white and then shows the other one as blue.
    Is that now correct?

    Quote Originally Posted by VIPStephan View Post
    What exactly isn’t working? :active is the state while the element is being clicked, i. e. while you hold your mouse button down.

  • #4
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,627
    Thanks
    0
    Thanked 648 Times in 638 Posts
    To trigger :active you need to either first trigger :hover with the mouse cursor and then depress a mouse button OR first trigger :focus and then depress the enter key.

    It tells you that the link is actually active and that when you release the button or key you will be taken to the page the link goes to (unless you move the mouse to undo the :hover or give something else the :focus first.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #5
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,852
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    I thought the active pseudo showed you what menu you are in?
    See Change link text style for current page.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •