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
Ashley Carpenter
13,393 PointsRemoving pictures in media queries
I'm not sure i understand how to do this; the code i'm using on my website is:
.picture-img, .picture { display: none; }
This has worked on my website but i am struggling with the tasks set in the responsive web design section.
I don't think i understand what i should be referring to in the ".picture-img, .picture" section. Can anyone explain this to me?
4 Answers
Chase Lee
29,275 PointsYou are selecting the img in the class .cupcake. In order to select a child in a parent you just put a space between them like this: parent child{code here}.
Please tell me if that dosen't make sense and what doesn't make sense.
Chase Lee
29,275 PointsCan you get a link to the code challenge.
Ashley Carpenter
13,393 PointsThis is the link to the challenge that i'm struggling with.
Matt Campbell
9,767 PointsJust wandering why you've give your image a class of .picture-img when you can select elements within classes. So selecting the class .picture and then selecting the img in that class will do the same, but with less code.
.picture img
That make sense?
Ashley Carpenter
13,393 Pointsthat does make sense, thanks.
Ashley Carpenter
13,393 PointsThanks guys you were both really helpful. I have finished the task now!
Chase Lee
29,275 PointsChase Lee
29,275 PointsAshley Carpenter.
Ashley Carpenter
13,393 PointsAshley Carpenter
13,393 PointsSorry Chase i'll check this out now, because of the time difference i have been in bed and at work.
Ashley Carpenter
13,393 PointsAshley Carpenter
13,393 PointsThanks for your help
Chase Lee
29,275 PointsChase Lee
29,275 PointsNo problem. Are you in the U.S.? If so what time zone?
Ashley Carpenter
13,393 PointsAshley Carpenter
13,393 PointsI'm in the UK, its about 10:40pm here now.
Chase Lee
29,275 PointsChase Lee
29,275 PointsI live near Los Angeles, California, USA.