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

Id font size?

Hello, I am trying to do this challenge:

Next, create a new media query that targets all devices when the viewport width is 769px or wider. Inside the media query, target the div with the ID logo and set the font-size to 1.4rem. Finally, target the h1 element and set its font-size to 4rem.

Bummer: Did you specify the correct font size for '#logo'?

Here is my code: @media screen and (min-width:769px) { #logo { font-size: 1.4rem; } h1 { font-size: 4rem; }

What is wrong? I know it is a silly mistake, but I cannot see it..

Thank you! :)

2 Answers

Gergely Bocz
Gergely Bocz
14,244 Points

Hi Sylvia Brombin!

On a first glance I belive you are missing the closing curly braces of your media query "}". Your code should look like this:

@media screen and (min-width:769px){ 
#logo { font-size: 1.4rem; }
 h1 { font-size: 4rem; }
}

If it still doesn't work, please give me a link to the challenge -or ask your question there so that others who are stuck on the same challenge can also see it.

Kaisha Jones
Kaisha Jones
6,366 Points

thanks for posting this Q & A!!! 🙏

You are right, Gergely. I was missing the curly braces :) Thank you for your help!