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 Grid Layout Going Further with Grid Layout Placing Elements Using Grid Template Areas

ian truong
ian truong
4,685 Points

grid placement in css are amazing but i have one concern. can header and nav share one space?

header{
  grid-column: 1 / 3;
}

nav{
  grid-column: 1/3
}

1 Answer

Steven Parker
Steven Parker
231,269 Points

That should put them in the same columns of two different rows.

To have them share one space, either put one inside the other (it's common to have a nav section in the header), or enclose them both in a shared container.

ian truong
ian truong
4,685 Points

but how do you put one inside the other?

Steven Parker
Steven Parker
231,269 Points
<header>
    header stuff here
    <nav>
        nav stuff here
    </nav>
</header>
ian truong
ian truong
4,685 Points

omg.. yes thats so simple lol. i forgot all about nesting nav inside header with html. thank you!