Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

jacqueline o'connor
jacqueline o'connor
86 Points

css hover state not working on mobile

Hello! I am working on a Squarespace website in which I've been customizing with css and html. I ran into an issue with css hover states not working on touch screens in Safari and Firefox. When using Chrome, the hover states seem to work just fine. Does anyone know why this is happening/what approach I should take to resolve this issue? Thank you!

Link to the website: website: https://www.michaelgravescollegereview.com/graphic-design

1 Answer

Steven Parker
Steven Parker
231,248 Points

I don't think there's a generally accepted and browser-independent way to detect "hover" on touch devices.

The best approach might be to use "any-hover" media queries to enable hover effects only on capable devices and use alternate selection methods on other devices.