Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS CSS Transitions and Transforms Getting Started with CSS Transforms Changing the Transform Position with transform-origin

why does Guil use img for second row of photos?

In about 5:50 of this video, Guil targets the second row of photos on hover state using .photo:hover img {}

I'm not really sure why he added the img at the end. this seems new to me. Does anyone have any insight into this?

thank you!

2 Answers

I think I get it now....the .photo is for the div, and then he's targeting the actual photo with img. the naming there had me confused for a second!

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Kudos for figuring out yourself! And yes he's targeting the img element inside the class named "photo". He could have named that class just about anything. For example: class = "everyoneLovesGuil". But he named it photo, because we tend to name our code in things that make sense. However, when starting out sometimes it can be difficult to sort out class names, IDs and elements. Hang in there, and it'll become second nature in no time!