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

Help With CSS Code Please

Challenge Task 2 of 3

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.

The code is not accepted.

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

Formatted for readability.

3 Answers

I copied your code into the challenge and it worked for me.

Are you sure you didn't have some extra text hanging around somewhere?

I don't know which video this comes from, but maybe the fact that you are adding width's to the CSS that is not in the assigment?

Thanks for your replies, sorry about the late reply. Internet started playing up.

It worked when I tried it the second time, must have been some unknown bug.

Thanks!