Style hover, focus, and active states differently

Zell Liew / filed under HTML & CSS

I’ve been styling :hover, :focus, and :active states the same way for years. I can’t remember when I started styling this way. Here’s the code I always use:

Subscribe to newsletter

Best design and frontend links delivered to your inbox every day and week. No spam, unsubscribe at anytime.

Choose frequency

Permission
Privacy Policy