CSS Grid Layout Flashcards
What’s the CSS grid?
The CSS grid is a two dimensional layout system
that lets you specify both columns and rows.
Is flexbox 2 dimensional CSS?
No, flexbox is 1 dimensional.
It can only do either a row or columns.
Is CSS grid an improvement over past methods?
Yes.
Floats, tables, and other CSS methods could easily break.
What is a grid container?
Grid containers establish formatting context for CSS items.

How does the CSS grid container control the grid items?
Name 3 ways
Grid containers control size, spacing, and alignment of grid items.
What is a grid item?
It’s a chunk of content that belongs to a grid container.

What are 4 examples of content that can be a grid item?
Header
Nav
Aside
Main
Footers
And their content
What direction to grid lines appear in?
Horizontal and vertical grid lines are possible
What number system do grid lines follow?
Start at 1 and increase in proportion to # of items
Apply to both columns and rows

Why are grid lines useful?
Grid lines help define columns and rows, by defining
their starting lines and end lines.
CSS Grid is a ______ layout system.
Two-dimensional layout system
Grid layout does not work together with flexbox.
True or False
False. Grid and flexbox are complementary layout
tools and have their specialties.
The _______ establishes the grid formatting context and manages how its direct child elements are spaced, sized, and aligned.
Grid Container
The direct children of a grid container are called _______.
Grid items
What divides the grid container’s space into columns and rows?
Grid lines
In the following code, the div with the class grid is the grid container. Which elements are the grid items?

See image

What are grid tracks?
Space between two grid lines that define columns and rows of grid
What do grid template columns control?
- Set column tracks
- Number of values
- Space of column
- Establishes size of columns
What do grid template rows do?
- Set row tracks
- Number of rows
- Height of row
- Establishes size of rows
How do you separate values for columns and rows?

Spaces
No commas
What does this communicate about the columns type?

3 columns
200 px each
What measurements can you use to define widths
of columns and heights of rows?
Pixels
Percentages
EM
REM
What does the auto value do?
adjusts size to fill available space
leaves no gaps around edges
auto is flexible, adjusting automatically to fill up space
What does the auto value do in the column context?






































