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

Ruby

Build a Simple Ruby on Rails Application - Frontend Development - CSS Error

Hello guys, I found an error in the statuses.css.scss file.

In the videos, it's created the following classes:

-.status.hover -.status.hover .admin

Actually, the hover property doesn't work this way because hover is a pseudo-class in this case, so the correct form would be:

-.status:hover -.status:hover .admin

Thanks

Thanks Anderson! Had the same problem, your solution worked.

3 Answers

James White
James White
6,159 Points

Um. If I remember correctly what they did was use some javascript/jquery to add a hover class. They didn't use the :hover pseudo-class.

Just so happened they used the name hover that is also a pseudo-class.

So in that instance .hover is correct.

Hello James, I just found strange because I took the project code and used it on c9 ide and it was not working that way. It only worked when I replaced ".hover" by ":hover".

Thanks James.

Thank you @Anderson Mattjie. I encountered the same problem as you.