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

HTML How to Make a Website Responsive Web Design and Testing Refactor the Layout

Matthew Bingham
Matthew Bingham
11,927 Points

You need to specify whether this is a class or ID. Quiz needs update.

Whilst my answer is correct, it's not clear whether "gallery" is a class or ID item. Please update the content (quiz question).

3 Answers

Hi Matthew,

Are you referring to the code challenge linked here or a quiz? You mentioned quiz a few times.

In the case of this code challenge you have the previous css to look at as Karthikeyan mentioned. Here you're simply overriding an earlier width set on the list items in the gallery. You would use the same selector in the media query that you see in the css above that's not inside any media queries. #gallery li

Even though you can't look at the html, the css tells you there's an element with an id of "gallery"

"gallery" is an ID because it is appended in front with #(hash) in CSS. If it is appended in front with .(period) it will be class.

I hope I answer your question.

Matthew Bingham
Matthew Bingham
11,927 Points

H, I'm aware of the syntax but the quiz doesn't point out which to insert into the code - Team Treehouse needs to update the question (although I'm not sure how I can make them aware).

Nick Pettit

Matt

Nick Pettit
Nick Pettit
Treehouse Teacher

Hi Matthew,

Sorry for the slow reply, I've been off for the month of August. The instructions I'm seeing on task 1/2 are as follows:

"Inside the media query, select the list items inside the gallery and add a width of 28.3333%."

In the code, there's two #gallery ID selectors. This seems fairly clear to me, but I might be missing something. Are you referring to another task or code challenge?

Yes very true that it is not clear. but the challenging part is this.

  1. We have to go through the CSS selectors in the file

  2. Identifying the gallery selector and their list items.

I really love this kind of challenge since I can learn a lot of stuff from this. As we all begin our journey as a front-end developer it is one of the most important skills.

In professional job you will ended up doing this a lot.

Have a good day mate.