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 trialCypher Aiken
688 PointsBummer!
Inside the media query, select the list items inside the gallery and add a width of 28.3333%.
Bummer! Be sure to set the width of gallery list items to 28.3333% when the browser is wider than 480px.
ive done this, could someone type out the FULL correct code nothing seems to work.
@media screen and (min-width: 480px) {
}
#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: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 #599a68;
margin-bottom: 60px;
}
}
2 Answers
Joshua Elmore
15,250 PointsYou have to write your code inside the media query
@media screen and (min-width: 480px) {
#gallery li {
width: 28.3333%;
}
}
#primary {
width: 50%;
float: left;
}
#secondary {
width: 40%;
float: right;
}
/*****************
3 + 5 = 15
100%-15% = 85%
85 / 3 = 28.333333333333
******************/
/*****************
PAGE: PORTFOLIO
******************/
#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 #599a68;
margin-bottom: 60px;
}
}
Joshua szkodlarski
8,604 Pointsall you're missing is the : after width
width: 28.3333;
I hope this helps
Cypher Aiken
688 PointsCypher Aiken
688 Pointsit didnt work :/