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 Build a Responsive Website Adaptive Design Implementing Media Queries

Richard Galt
Richard Galt
897 Points

challenge 2 of Media Queries

Hi,

I am having issues completing this task, I have added in this following code but cannot tell why it is wrong... please help!

'''

/* Mobile ----------- */ @media screen and (max-width : 480px) {

  .grid_1,
  .grid_2,
  .grid_3,
  .grid_4,
  .grid_5,
  .grid_6,
  .grid_7,
  .grid_8,
  .grid_9,
  .grid_10,
  .grid_11,
  .grid_12 {
    width: 100%;
}
  #nav ul  li.contact {
            width: 100%;
    }
  #nav ul  li.menu {
            width: 100%; 
            }
}

'''

1 Answer

Shawn Flanigan
PLUS
Shawn Flanigan
Courses Plus Student 15,815 Points

Richard:

It looks like you're doing a lot of extra work here. In task 2, they only ask you to alter the .contact and .menu selectors, so your entire Mobile media query should look something like this.

 /* Mobile ----------- */
    @media screen and (max-width : 480px) {
      .contact, .menu {
       width: 100%; 
      }
    }

Let me know if I'm looking at the wrong task.