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

Expanding the navigation list items to it's full width as the website scales to the right?

Here is my code currently https://w.trhou.se/v79bmacktk .

I'm just having issues with having the navigation list items expand as the website scales to right at this time. I'm currently working on this in the @media (min-width: 769px) breakpoint. Any help would be much appreciated, thank you.

Hey Stephen,

Try using flex-box on the .main-header class and removing the hard width and margins for the .name h1 tag:

.main-header {
    display: flex; // turn the main header into a flex box container
    align-items: center; // vertically align the children
    justify-content: space-between; // Push the children out to the edge of the container
}

Flex Box Guide

Hope that helps,

-Ben

1 Answer

Hey Ben, that worked perfectly. I thank you so much for the help and I highly appreciate that!