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

Owa Aquino
Owa Aquino
19,277 Points

Need help on solving the width of the main-header.

Hi guys!

Just want to know what's wrong with my css code. I already set the main-header width to 100% of the screen. But it seems that the main-header still cut off.

https://w.trhou.se/il96yx0heq

TYIA.

  • Owa

1 Answer

Hi Owa,

seems like the problem is, that you've a max-width in your wrapper on the 1025px and 769px breakpoints. The main-header can't be wider than your wrapper so the problem occurs:

@media (min-width: 1025px) {
..
    .wrapper{
        max-width: 1150px;
        margin: 0 auto;
    }
...
}

@media (min-width: 769px) {
...
    .wrapper{
        max-width: 90%;
        margin: 0 auto;
    }
...

you should adjust these max-widths.

Owa Aquino
Owa Aquino
19,277 Points

This is great.

Thank you Gregor!