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 Build a Three Column Layout

Deborah Williamson
Deborah Williamson
2,997 Points

Issue width "building a three column layout'

So I used the correct code that nick has in the teachers notes, but i still cant seem to get rid of that awkward spacing.

Wayne Priestley
Wayne Priestley
19,579 Points

Hi Deborah,

Could you please post your html and css so we can take a look and help you out.
Here is a link to explain how to use Markdown to post your code How to post code

If you look at the bottom of the box when your typing a reply you will see Markdown Cheatsheet that will also explain how to post your code.

Deborah Williamson
Deborah Williamson
2,997 Points
@media screen and (min-width: 480px) {

  /********************
TWO COLUM LAYOUT
********************/

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

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


  /**************************************
  3 * 5 = 15%
  100% - 15% = 85%
  85 / 3 = 28.333333333333
**************************************/

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

 #gallery li {
  width: 28.3333%
  }

  #gallery li:ntn-child(3n+1) {
  clear: left;
  }
}

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

}

2 Answers

Hi Deborah,

You have a typo with ntn-child. Should be nth-child

You're also missing a semicolon here:

#gallery li {
  width: 28.3333% /* Should have semicolon after % */
  }

It's not strictly necessary to have it when there's only one declaration but you might add more in the future and then it'll be a problem.

You're welcome.

Make sure you put in the other missing semicolon that Wayne found because that will mess up your contact page.

Wayne Priestley
Wayne Priestley
19,579 Points

Hi Deborah,

Your missing a couple of semi colons,

Here

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

And here,

#gallery li {
  width: 28.3333%
  }

Hopefully that fixes it.