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 trialArielle Salyers
5,910 PointsCSS Media Query Code Challenge
I'm stuck on this code challenge. It keeps asking me if I've floated the .logo to the right and I'm positive I've done it correctly, but obviously something is wrong. The challenge is: 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 screen and (min-width: 796px) {
.logo {
float: left;
}
.main-nav {
float: right;
}
.main {
width: 40.425531914894%;
}
.extra {
width: 23.404255319149%;
display: block;
}
}
What am I doing wrong?
1 Answer
Andrew Shook
31,709 PointsYou have a typo. You put 796px instead of 769px.
Arielle Salyers
5,910 PointsArielle Salyers
5,910 PointsThank you so much. I feel like an idiot but it kept saying the problem was with the float left! So I wasn't looking for a typo in the width! Thank you!
Andrew Shook
31,709 PointsAndrew Shook
31,709 PointsNo worries, it happens all the time to me too.