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

How do you use CSS grid on a tag wrapped inside a HTML5 main tag?

Does anyone know how to style a section and article tag wrapper inside a HTML5 main tag.

1 Answer

Steven Parker
Steven Parker
231,248 Points

The basic idea would be to declare your main as display: grid. That makes all the items within it "grid items". From there you can proceed to set things up based on how you want it to appear.

Have you taken the CSS Grid Layout course? This is covered there. Plus there are several companion practice workshops available. Check the Library.