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 trialSaul Casillas
3,566 Pointscode quiz problem
Hi i am trying to pass this quiz and it is telling that i need to float the logo to the left but i did and cant let me pass it can someone revise my code maybe i am missing something thanks.
@media only screen and (min-width: 769px) { .logo { float: left; } .main-nav { float: right; } .main { width: 40.425531914894%; } .extra { width: 23.404255319149%; display: block; } }
6 Answers
Erik McClintock
45,783 PointsSaul,
When I copy and paste your code into the code challenge, it passes. Everything looks good.
Erik
Erik McClintock
45,783 PointsWhat error are you seeing?
Saul Casillas
3,566 Pointsthis is the code quiz questions Under "Tablets to Desktop," create a new media query that floats .logo left and .main-nav right if the viewport is 769px or wider. Then, add all other "Tablets to Desktop" rules inside the media query. Finally, create a new property inside the .extra rule that displays it as a block element.
this is my code
/* Tablets to Desktop */ @media only screen and (min-width: 769px) { .logo { float: left; } .main-nav { float: right;
.main { width: 40.425531914894%; v} .extra { width: 23.404255319149%; display:block; }
}
Saul Casillas
3,566 Pointsthis is the code quiz questions Under "Tablets to Desktop," create a new media query that floats .logo left and .main-nav right if the viewport is 769px or wider. Then, add all other "Tablets to Desktop" rules inside the media query. Finally, create a new property inside the .extra rule that displays it as a block element.
this is my code
/* Tablets to Desktop */ @media only screen and (min-width: 769px) { .logo { float: left; } .main-nav { float: right;
.main { width: 40.425531914894%; v} .extra { width: 23.404255319149%; display:block; }
}
Erik McClintock
45,783 PointsIf that code is exactly what you have in your code challenge (i.e. copied and pasted), then it looks like you're missing a closing curly brace after your .main-nav section and there's a "v" sitting at the end of your .main section just before the closing brace. Try adding that closing curly brace for the .main-nav section and deleting the "v" character from the .main section and see if it works!
Otherwise, I don't see anything wrong with the code that you have there. If the above isn't the solution, perhaps something else was accidentally moved or deleted in the other pieces of code?
Erik
Saul Casillas
3,566 PointsHi thanks for your help i did enter the code and check and nothing i get the error that if i float the logo to the left.
this my code
@media only screen and (min-width: 769px) { .logo { float: left; } .main-nav { float: right; }
.main {
width: 40.425531914894%;
}
.extra {
width: 23.404255319149%;
display: block;
}
}