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

Stuck...AGAIN

What am I doing wrong on this css? Keeps asking me to float the logo left, it looks correct to me. Where's my mistake? Thx.

@media only screen and (min-width: 769px) { .logo { float: left; }

4 Answers

alex mattingley
alex mattingley
7,508 Points

Hi Pamela,

You have written the code in sort of a strange way. I really recommend writing your code with the correct structure like so:

@media screen and (min-width:769px) {
  .logo { 
    float: left; 
} 

Also I'm not that familiar with the challenge but I do not think its @media only screen but rather @media screen as stated above.

Lastly, Learning how to research problems in your code is a very valuable skill, I would highly recommend searching for that particular challenge in the past questions. You can find what you are looking for just by looking for the name of the challenge.

Let me know if that helps.

Hi Alex, Thanks for your reply. I was trying to save space in my question, hence the code display. I save the lesson notes and I have gone over them but, to no avail. I will take your suggestion and do more research. Thanks again.

Justin Horner
STAFF
Justin Horner
Treehouse Guest Teacher

Hello Pamela,

The challenge is asking you to do several steps, all of which need to be performed before it will pass.

It's asking you to first create a media query like so.

@media only screen and (min-width:769px)
{

}

Then it asks you to float .logo left and float .main-nav right. Have you done this?

@media only screen and (min-width:769px)
{
    .logo {
       float: left; 
    }
    .main-nav {
      float: right; 
    }
}

It then wants all the remaining "Tablets to Desktop" rules added to the media query we just created and make the .extra rule display as a block element.

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

I hope this helps.

Hi Pamela,

Make sure that you have your closing curly brace for the previous media query "Phones to Tablets"

You should then get a new error message if you're missing any of the things that Justin has shown.