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 Techniques Display Modes Table Display

Why does Guil just use '@media' rather than '@media screen and'?

In the video when he adds the media query for the header, why does he only use "@media" and not "@media screen and"?

1 Answer

Michael Hulet
Michael Hulet
47,912 Points

The screen and part is totally optional. All that it does is make sure that the CSS in that block is only applied on digital screens, and not in things like print or on a projector. Guil's method in the video allows that CSS to be displayed on any display type

Thanks for the reply! I definitely wasn't questioning Guil, I just didn't understand what the reasoning was. Thanks again!