Input button active styling? (without anchors)
css, jquery
Solution
Actually, you can apply the `:active` pseudo-class to form buttons.
Here is an example:
http://jsfiddle.net/xvWG5/
Hope this helps!
Problem
I am working on making some stylish buttons using as basic of HTML as possible. ``` <input type="submit" value="Submit!" /> ``` However, styling the "pressed down" state is proving difficult. Everywhere I look online, designers seem to bypass this problem by using anchors, and then taking advantage of CSS's `:active` pseudo-class. Unfortunately, it appears buttons do not have this. They have `:focus`, but that doesn't really work the same way. So my question is this: Is it possible to style a "down" state without modifying this HTML? I am willing to use jQuery if necessary, but I'm mostly hoping that there is a pure CSS solution that doesn't involve anchors. What do you all recommend? Thanks!