From the course: CSS Essential Training

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

The implicit grid

The implicit grid

- [Instructor] When using a grid layout, grid template rows and grid template columns are used to define a fixed number of tracks to form an explicit grid. Once the explicit grid is filled, or if no explicit grid has been defined, the grid container will create an implicit grid. If you have dynamic content such as a newsfeed, search results, or a list of comments, you don't always know ahead of time how many items you need to display. In this scenario, using an implicit grid is a good option. To define the size of implicit grid tracks, use the grid auto rows and grid auto columns properties. They use the same values and syntax as grid template rows and grid template columns. Let's continue with the pen from the previous lesson. Here is where we left off. We had six grid items, but only defined three columns and one row in the explicit grid. So items four to six are placed in an implicit row. The height of the rows in…

Contents