0
0
CSSmarkup~5 mins

Grid rows and columns in CSS - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What CSS property defines the number and size of columns in a grid?
The grid-template-columns property sets the number and size of columns in a CSS grid layout.
Click to reveal answer
beginner
How do you set three rows each 100px tall in a CSS grid?
Use grid-template-rows: 100px 100px 100px; to create three rows each 100 pixels tall.
Click to reveal answer
beginner
What does the CSS value 1fr mean in grid layouts?
1fr means one fraction of the available space. It divides space evenly among grid tracks.
Click to reveal answer
intermediate
How can you create a grid with two columns: first 200px wide, second fills remaining space?
Use grid-template-columns: 200px 1fr;. The first column is fixed 200px, the second takes leftover space.
Click to reveal answer
intermediate
What is the difference between grid-template-rows and grid-auto-rows?
grid-template-rows sets explicit row sizes you define. grid-auto-rows sets size for rows created automatically beyond those defined.
Click to reveal answer
Which CSS property controls the height of grid rows?
Agrid-template-rows
Bgrid-template-columns
Cgrid-row-gap
Dgrid-auto-columns
What does grid-template-columns: repeat(3, 1fr); do?
ACreates 3 rows each 1fr tall
BCreates 1 column repeated 3 times vertically
CCreates 3 columns each 1px wide
DCreates 3 columns each taking equal space
If you want a grid row to be exactly 150 pixels tall, which value do you use?
A150fr
B150px
Cauto
D1fr
Which property sets the size of rows created automatically beyond the defined rows?
Agrid-row-gap
Bgrid-template-rows
Cgrid-auto-rows
Dgrid-template-columns
What does 1fr represent in grid sizing?
AOne fraction of available space
BOne fixed pixel
COne percentage
DOne em unit
Explain how to create a grid with 4 columns where the first two are 100px wide and the last two share the remaining space equally.
Think about mixing fixed sizes with fractional units.
You got /4 concepts.
    Describe the difference between explicit and implicit grid rows and how CSS properties control their sizes.
    Consider what happens when you add more content than defined rows.
    You got /4 concepts.