0

i have a button. i want it so that when user click on it, it should stay ative. but this code below doesnt stay active. i am trying to get a toggle effect but when user click on it it stay active any cant go back,

<button type='submit' id='button1' class='button' name='button_1'>button1</button>


#button1
{
 color:white;
}

#button1:active
{
 color:green;
}
2
Contributors
1
Reply
2
Views
4 Years
Discussion Span
Last Post by pritaeas
0

After :active it will use :visited. However, if you are paranoid like me and have browser history disabled, the next time I visit the page it will be normal again (not active, and not visited).

#button1:active, #button1:visited { color: green; }
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.