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

Show text upon hovering

Hi Treehouse,

I'm trying to make some <p> text visible when one hovers over the image in which it is placed. Tried a few options and they don't seem to work.

The pen is here: http://codepen.io/reskk/pen/KgygBO

Anyone got any ideas?

Hi,

I think I have created a solution for you?

Let me know with this pen: http://codepen.io/anon/pen/yaPVwX

~J

1 Answer

Hi Justin,

Thanks for your response. For some reason the Treehouse notification system is very delayed atm so I have only just got this. In the meantime I figured out the solution - being able to select a subclass within a pseudoclass, i.e

.pic:hover .pictext {}

Whereas before I was trying to do this:

.pic:hover { .pictext {} }

Which clearly wasn't working.

I appreciate your help though!

Cheers,

Rik