treehouse : what would you like to learn today?
Web Design Web Development iOS Development

How to solving : CSS selector “:active” not working ?

  • I'm very confused, because :hover selector was working normaly, but :active not working.
    The case is when click $name the page script was same but different URL because using ?room=<?php echo $ID;?> and when hover name occurred color blue and after click occurred still blue (active). In this problem, hover working normally but selector active not working Sad(

    The code:

    ::CSS::
    #working
    selec:hover{background-color:blue;}


    #not work
    selec:active{background-color:red;}


    ::PHP::
    <a href="?room=<?php echo $ID;?>"><div id="selec"><?php $name;?></div></a>

    Anyone can help me to solving this big problem because at several forum this problem not yet has fixed Sad( ? Thank you

    Code : http://www.mediafire.com/download.php?7yl1av89ctd55c4
    Image : http://www.mediafire.com/?c9wjw0e1y9ktqh6




  • After click occurs is :visitive, not :active.. :active is during the click.