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.

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

Rastislav Marecek
Rastislav Marecek
15,279 Points

incorrect code

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

gets marked wrong when I enter the following code: @media screen and (min-width: 480px){

#gallery li { width: 28.3333%; } I don't know where there is a problem. Can you please have a look at it ? thank you

3 Answers

Hi Rastislav,

I don't know if you left it out in the code challenge but you are missing the closing bracket for the media query. Also, to post code properly click on the link below the text area that says Markdown Cheatsheet and follow the instructions. you can also look at this example: How to display code at Treehouse.


Rasmus Willemoes Paulsen
Rasmus Willemoes Paulsen
12,436 Points

I think you are missing a closing bracket like Jeff is mentioning:

Something like this:

@media screen and (min-width: 480px) {

#gallery li {
    width: 28.3333%;

philip cartlidge
philip cartlidge
Courses Plus Student 4,032 Points

this is a great course but really lets itself down by not helping when you are stuck... if this continues i will opt out! its very good but these things are to time consuming when you are on a break from work and need to know where you are wrong etc

Hi philip,

I agree, when I get stuck I wish I had someone to ask questions to. I have programming books I try to learn from and I run into the same problem there. I finally realized the answer to that problem is to go to a regular school. But that brings up other problems; I have to make time for that and spend a lot more money for that. Even that is no guarantee. I once had an instructor who never once was able to answer my questions, had to google for the answers. After some careful consideration I decided that books and online courses might be the best solution for me. Thank God for Google; talk about a time saver.

Best of Luck,