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 How to Make a Website Responsive Web Design and Testing Build a Three Column Layout

Sophia Harrison
Sophia Harrison
4,534 Points

Three Column Layout fails

I was able to successfully create the two columns for the Contact Page (although they don't stack on top on one another when the screen is reduced to smartphone size, which is a separate issue.) However, my Portfolio CSS code is basically being ignored. Can anyone tell me what the issue might be?

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


  /**********************
TWO COLUMN LAYOUT
***********************/

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

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


/**********************
PAGE PORTFOLIO
***********************

#gallery li {
  width: 28.3333%;
  }

#gallery li:nth-child(4n) {
  clear: left;
  }

}

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

  }

/**********************
GENERAL
***********************/

body {
  font-family: 'Source Sans Pro', sans-serif;
}

#wrapper {
  max-width: 90%;
  margin: 0 auto;
  padding: 0 5%; 
}

a {
  text-decoration: none;
}

img {
  max-width: 100%;
}

#gallery li a p {
  margin: 0;
  padding: 5%;
  font-size: 0.75em;
  color: #bdc3c7;
}

h3 {
  margin: 0 0 1em 0;
}

/*********************
PAGE: PORTFOLIO
**********************/

#gallery {
  margin: 0;
  padding: 0;
  list-style: none;
}

#gallery li {
  float: left;
  width: 45%;
  margin: 2.5%;
  background-color: #f5f5f5;
  color: #bdc3c7;
}

1 Answer

Ken Alger
STAFF
Ken Alger
Treehouse Teacher

Sophia;

It looks like you are missing your closing comment tag */ in your first Portfolio section.

That would likely do it.

Ken

Sophia Harrison
Sophia Harrison
4,534 Points

Wow. I can always see other people's coding errors, but apparently not my own, lol. I guess the value of a fresh pair of eyes can't be over-estimated. Thanks Ken!