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 trialSean Conrad
4,223 PointsAre the images under #gallery? Something else? There is not enough guidance here.
I used the code from the video, which worked on my test site, but apparently the context isn't correct.
It's extraordinarily frustrating to know what code I should be using and how to use it and then be told I'm doing it wrong.
3 Answers
Jason Anello
Courses Plus Student 94,610 PointsHi Sean,
You want to take the code challenge instructions literally. Don't assume that the code will be like the project. Sometimes it is but it won't always be exactly the same.
Here it is saying "all images" so it's not just the images in the gallery or the images in some other part of the site, it's all images.
So what it wants you to use is a type selector, img
img {
}
This selector will select all images which matches what the instructions are asking for.
If it was only supposed to be images within the gallery then the code challenge would definitely be more specific about that.
I hope this helps.
Sean Conrad
4,223 PointsWow. I ASSUMED that because I hit "Ask a Question" it would include relevant information!
I'm asking this question because the "Code Challenge: Make a CSS Image Gallery" does not like my response.
The Code Challenge states: Add CSS that will allow all images to fill their parent element.
These code challenges are great, but every so often I come across one I can't complete because the prompt is "Make a thing do something" and even though I know exactly what code to use, I don't have enough contextual information to make the compiler happy. I love this site, but these things make me want to pull my hair out. Write another sentence! Include the ID of the gallery, or SOMETHING.
Jason Anello
Courses Plus Student 94,610 PointsWhen you hit "Ask a Question" I believe that's what's responsible for putting a link to the challenge over in the right column.
So it's not going to fill in any information in your post but it provides the link for us so we can see what you're talking about.
Sean Conrad
4,223 PointsThank you very much for the response, Jason, it was very helpful.