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 CSS Layout Basics CSS Layout Project Introducing the Project

Issue with Media Queries

HI,

I was wondering if anything was having issues or had issues with the Media Queries section of this project.

As i went in, the (min-width) section and the first { brace was highligthed red.

No matter what i add to the media query, it doesn't affect the layouyt.

Any idea what this is?

Here is a snapshot of the workspace:

https://w.trhou.se/z8vitg024r

No changes have been done yet.

3 Answers

Brodey Newman
Brodey Newman
10,962 Points

Hey Derrick,

Try adding 'screen and'. The below code should help.

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

    /* ---- Float clearfix ---- */

    .clearfix::after {
        content: " ";
        display: table;
        clear: both;
    }

/** To see that it's working **/  

  body {
    background-color: green;
  }

}
Andrew Kilroy
Andrew Kilroy
3,859 Points

I think this is just an internal error in the worksheet internal workings. Seemed to be a few comments when I was working on it, or workaround by adding "all" after @media etc. Being blank after media should be the same function as @media all but it's just not picking it up.

Brodey Newman
Brodey Newman
10,962 Points

Yeah, I agree. It is weird.