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

I have no idea how this is not 28.3333% width.

I followed everything exactly. I'm sure I'm missing a colon or bracket somewhere

css/main.css
@media screen and (min-width: 480px) {

/* Two Column Layout */

  #primary {
    width: 50%;
    float: left;
}

  #secondary {
    width: 40%;
    float: right;
  }

  #gallery li {
    width: 28.3333%
  }

  #gallery li:nth-child(4n) {
    clear: left;
  }
    /* Page: About */
    .profile-photo {
      float left;
      margin: 0 5% 80px 0;
    }
}

@media screen and (min-width: 660px) {
  /* Header */

  nav {
    background: none;
    float: right;
    font-size: 1.125em;
    margin-right: 5%;
    text-align: right;
    width: 45%;
  }

  #logo {
    float: left;
    margin-left: 5%;
    text-align: left;
    width: 45%;
  }

  h1 {
    font-size: 2.5em;
  }

  h2 {
    font-size: 0.825em;
    margin-bottom: 20px;
  }

  header{
    border-bottom: 5px solid #F00;
    margin-bottom: 60px;
  }

  body {
    background: #000;
  }

}
Shawn Boyd
Shawn Boyd
14,345 Points

How much have you modified the code from the beginning of the code challenge? This looks entirely different from when I open up the challenge. Adding the width to the provided code should only be one line of code.

2 Answers

Jake Lundberg
Jake Lundberg
13,965 Points

You forget the semicolon after 28.3333%.

i'm such an idiot

Jake Lundberg
Jake Lundberg
13,965 Points

hahaha no worries, we have all done it.

actually, that still hasn't fixed it

Jake Lundberg
Jake Lundberg
13,965 Points

The code you posted is not the same as the code from the challenge...you should only have

#gallery li {
   width: 28.3333%;
}

inside your media query...and there should only be one media query...? But you have multiple...did I miss something?