dibigid Posted September 14, 2012 Share Posted September 14, 2012 Pretty straight forward question I think... I'm redesigning my website buttons to use an image sprite. I can get them to display the normal image from the sprite, as well as the :hover image, but I'm having no luck finding a way to get the button to change appearance when you click on the button (not in the new page, but the actual "onclick"). Is this even possible with an image sprite and CSS or would I need to implement something else? I've found absolutely nothing on the internets related to this. Thanks! Link to comment Share on other sites More sharing options...
Ingolme Posted September 14, 2012 Share Posted September 14, 2012 You need Javascript events to detect clicks. In some browsers, the :active pseudo-class works with CSS, but in others it switches back as soon as the mouse button is released. I'm not sure which is the standard way now, but I wouldn't rely on that. Link to comment Share on other sites More sharing options...
dibigid Posted September 14, 2012 Author Share Posted September 14, 2012 Alright, thanks for the info. Much appreciated Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now