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

CSS Unused CSS Stages Media Queries Adaptive Layouts with Media Queries

Nicholas Klunder
Nicholas Klunder
8,144 Points

Getting a float: left error on this challenge

I'm having trouble with task 2 of 3 in this challenge. It gives me the error "Bummer! Did you float '.logo' left?" when I check my work. The answer to that question is yes, I did. Is there anything wrong with my code that would be giving me this error?

 @media only screen and (min-width: 769px) {
   .logo {
      float: left;
    }
   .main-nav {
      float: right;
    }
   .main {
      width: 40.425531914894%;
    }
    .extra {
      width: 23.404255319149%;
      display: block;
        }
  }

2 Answers

I just passed this challenge using @media screen (not @media only screen) and I had to put the .extra display block above the @media screen element.

Nicholas Klunder
Nicholas Klunder
8,144 Points

Thanks Diane!

Actually just removing the "only" from the media query fixed the problem on my end. I appreciate your help.

Great!