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 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!