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

Code challenge not working even though all code is correct

Hi,

I'm now stuck on Media Queries code challenge Task 2 of 3. The error message; 'Bummer! Did you float .logo left?' keeps being returned to me even though the code is 100% correct. I've tried it every way that I can think of but STILL doesn't work.

Here's my code:

/* Complete the challenge by writing CSS below */

/* Phones to Tablets */

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

.main {
    width: 65.957446808511%;
}
.secondary {
    width: 31.914893617021%; 
}
.secondary,
.extra {
    margin-left: 2.127659574468%;
}

/* Tablets to Desktop */

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

I really hope you can help on this I just can't seem to see where to go from here. As you can see; I HAVE floated the .logo to the left...

Edit: I've even tried it through copy + paste from CodePen - no joy...

Many thanks.

3 Answers

uhm you are missing the closing curly brace from the media query in your phone to tablets rule ...

@media (min-width: 481px) {

    .col {
        float: left; }
    .main {
        width: 65.957446808511%; }
    .secondary {
        width: 31.914893617021%; }
    .secondary,
    .extra {
        margin-left: 2.127659574468%; }

}

Ahhhh thanks Maximiliane, it looks like checking for any missing curly brackets will be an on going issue for me from now on !!!

Thanks again.

No worries :0)