Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS CSS Basics (2014) Enhancing the Design With CSS Adjusting the Layout with Media Queries

1,212 Points

Background gets smaller when adjusting with media query

When i get to the step where i should adjust the main header with media query it's also resizeing my background. (broad white space on the right)

@media (max-width: 1024px) { .primary-content, .secondary-content { width: 90%; } }

@media (max-width: 768px) { .primary-content, .secondary-content { width: 100%; padding: 20px; border: none; }

.main-header { max-width: 380px; padding: 50px 25px 0; }

.title { font-size: 1.3rem; border: none; } h1 { font-size: 5rem; line-height: 1.1; }

.arrow { display: none; }

.intro { font-size: 1rem; } }

Steven Parker
Steven Parker
218,639 Points

CSS is hard to test without the HTML it works on. Share the entire project by using the "snapshot" function in the workspace, and then posting the link it gives you.

1 Answer

In your .main-header selector, you are setting the max-width property instead of max-height.

It should be:

  .main-header {
    max-height: 380px;
    padding: 50px 25px 0;