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 trialDeborah Williamson
2,997 PointsIssue 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.
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
Jason Anello
Courses Plus Student 94,610 PointsHi 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.
Deborah Williamson
2,997 PointsHaha. Silly me. Thanks!
Jason Anello
Courses Plus Student 94,610 PointsYou're welcome.
Make sure you put in the other missing semicolon that Wayne found because that will mess up your contact page.
Wayne Priestley
19,579 PointsHi 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.
Wayne Priestley
19,579 PointsWayne Priestley
19,579 PointsHi 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.