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

HTML How to Make a Website Responsive Web Design and Testing Write CSS Media Queries

Create a breakpoint for devices 480 pixels wide or larger. Inside the breakpoint, set the h1 font-size to 2.5em.

The challenge only gives the css/main.css page to work in. The actual topic was not shown in css/main.css. So how can I possibly answer the question? It also has an @ sign, which I've not seen in the css/main.css page.

4 Answers

Ferdinand Pretorius
Ferdinand Pretorius
18,705 Points

Hi Sarah,

Because of css's cascading nature, you can just place your media query (break point) at the bottom of the main.css page.

The code you need is as follow:

@media screen and (min-width: 480px) {
    h1 {
        font-size: 2.5em;
    }
}

Though I do recommend checking out this course http://teamtreehouse.com/library/responsive-layouts just to get you up to 'scrath' with media queries.

Hope this helps

Thank you! That's so odd.. I swear I did that the first time and got denied. I also think the directions of the challenges are lacking in clear communication.

When I do these challenges and quizzes I treat them as open-book tests. If I don't happen to remember right off the top of my head I'll re-watch the video or Google for the answer. In this case, re-watching the video will really help you out.

Thank you, but I did and it didn't help at all, because code is often written differently in different pages; html, css, etc. They never showed the code in the window they gave for the challenge. Thanks for the Google tip. :)

Removed the "screen and" and it worked at the bottom of the page

@media (min-width: 480px) { h1 { font-size:2.5em; } }