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
Chris Mursheno
Courses Plus Student 3,017 PointsCSS: Media Qries CODE CHALLENGE syntax issues
I'm stumbling on the CSS: Media Queries Code challenge in the 2nd question; the 1st one prompted me to create a media query that floats the " .col" elemnts. left when viewport is 481px & >. Got that correct and understand the rationale behind implementing these so to adjust the screen elements to show legibly on various devices.
But when it asks me to go under the CSS " Tablets to desktops" & create a new qry which floats '.logo' left & '.main-nav' rgt when vwport is 769 and >, I'm getting a message "Bummer! did you float .logo left"?
It also went on to prompt me to add all the other rules to the media query. Lastly to create a new property inside the 'extra' rule which displays it as a block element. Here's what I have and I tried all kinds of different scenarios, I can't see what I'm doing wrong.
@media screen and (min-width: 769px) {
.logo {
float: left;
}
.main-nav {
float: right;
}
.extra {
display: block;
}
3 Answers
Brian Clovis
5,899 PointsIts always something small, like a missing semi-colon, curly brace, etc.......
Dyle MacGregor
1,267 Points^yup you are missing the last curly brace of the query.
@media screen and (min-width: 769px) {
.logo {
float: left;
}
.main-nav {
float: right;
}
.extra {
display: block;
}
} /*you need a right curly brace here*/
shervin mashayekh
Courses Plus Student 11,915 Pointsmy friend you are missing a curly brace at the end of your code to close your @media tag
James Barnett
39,199 PointsA text editor with tag matching is your friend