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 trialMonica Collins
2,777 Pointsclosing brackets twice after two @media points. you do not explain why we have to have two
in the video i do not understand why we have to brackets between two different Dan Catton . why!
3 Answers
Dustin Matlock
33,856 PointsHi Monica, the opening and closing curly braces show where the CSS declaration begins and ends. Below is a graphic to help depict the anatomy of CSS. A media query has its own set of braces because it's essentially a set of rules that run when a particular view port size is reached. For more information check out @media at MDN.
Jeff Busch
19,287 PointsHi Monica,
Basically, for every opening bracket { in your code, you need a closing bracket }. If this doesn't answer your question please offer an example.
Jeff
Monica Collins
2,777 PointsSo sorry Dustin, I took for granted that you could see where I was in the video, my fault. I meant in the responsive video and responsive.css in the beginning where we have: @media screen and (min-width: 480px) { body { background: navy; } } we have two opening bracket and two closing brackets (of course) . I think now I get it, but it was a little confusing in the test to remember that.