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 Basics (2014) Enhancing the Design With CSS Adjusting the Layout with Media Queries

Sardor Latipov
Sardor Latipov
5,609 Points

I am stuck on the last question after this video. is it bug?

I don't know what am I missing. I thing I am doing everything right, but still getting bummer. So the second question after this video is holding me here. Help please! I tried to upload the screenshot, I don't know how to do it here.

Steven Parker
Steven Parker
231,261 Points

You linked to a video, but it sounds like you may be talking about a quiz or challenge, is it one of those?

Don't worry about a screenshot, but if it's a challenge, do show the code you were trying and link to the challenge. If it's a quiz, copy the quiz question.

Sardor Latipov
Sardor Latipov
5,609 Points

Thanx. Here's the code.

/* Complete the challenge by writing CSS below */ @media (max-width: 1020px) { .main-header { background: tomato; color: white; }

}

@media (max-width: 768px;) { .title { font-size: 1.4rem; }

h1 { font-size: 5rem; } }

after submitting this, it says wrong.

2 Answers

Steven Parker
Steven Parker
231,261 Points

Thanks for the extra info, Sardor, it's all clear now.

You just have one little typo

There's a stray semicolon following the max-width specification in your second media query.

In future, when posting code, be sure to use the formatting method in the Markdown Cheatsheet pop-up found below the text area.

Daniel Gauthier
Daniel Gauthier
15,000 Points

Hey Sardor,

Your brackets are a little out of place.

This is the working code:

@media screen and (max-width: 1020px) {

 .main-header {

   background: tomato;
   color: white;

 }

}

@media (max-width: 768px) {

  .title {

    font-size: 1.4rem;

  }

  h1 {

    font-size: 5rem;

  }

}

You've got a semicolon in the second media query that is likely causing the issue. (max-width: 768px;)

Good luck!

Sardor Latipov
Sardor Latipov
5,609 Points

Thank you for you support Daniel. it helped.