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 trialMichael Carson
933 Pointsnav header is not changing background or aligning to the right
@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;
}
/************************
PAGE: ABOUT
************************/
.profile-photo {
float: left;
margin: 0 15% 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%;
}
}
5 Answers
Jason Anello
Courses Plus Student 94,610 PointsCan you post a snapshot of your workspace?
From what I can tell here, you have an extra closing curly brace on your 480px media query.
The one right before the "portfolio" comment seems to be extra.
Jason Anello
Courses Plus Student 94,610 Pointschanged from comment to answer
Alexander Davison
65,469 PointsYou must put your media queries at the end of the stylesheet. This is required
I hope this helps.
~Alex
Michael Carson
933 PointsHey Alex, I've tried this and there is still no difference, i'm really confused.
/************************
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;
}
/************************
PAGE: ABOUT
************************/
.profile-photo { float: left; margin: 0 15% 80px 0; } }
/************************ HEADER ************************/
nav {
background: none;
float: right;
font-size: 1.125em;
margin-right: 5%;
text-align: right;
width: 45%;
}
@media screen and (min-width: 660px)
@media screen and (min-width: 660px)
Michael Carson
933 PointsThank you Jason, i missed that completely!
Jason Anello
Courses Plus Student 94,610 PointsIs it working now? I'll change my comment to an answer if that's what it was.
Michael Carson
933 PointsIt's all working now, thank you so much. I was losing hope for a minute haha
Jason Anello
Courses Plus Student 94,610 PointsJason Anello
Courses Plus Student 94,610 Pointsfixed code formatting