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 Layout Techniques Grid Layout Testing our Grid

Roland Cedo
Roland Cedo
21,261 Points

Simple Question: When using Grid Layout, how is the height of an element determined?

I may have missed a very simple concept when using Grid Layouts:

How is the height of an element determined when using a Grid Layout?

I understand that declaring the class="grid-x" will apply the WIDTH of how many columns an element will span, but how is the HEIGHT defined?

A simple question, I know I may have simply looked it over...

Thanks all in advanced!

3 Answers

Brendan O'Brien
Brendan O'Brien
9,066 Points

Most grids I've used rely on the height of the content within the columns. So, say you have a div spanning 12 columns and you have a picture in there with a height of 200px then that div will also have that height.

Roland Cedo
Roland Cedo
21,261 Points

Thanks Brendan! Makes sense :)