0
0
CSSmarkup~5 mins

Align content in CSS - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does the CSS property align-content do?

The align-content property controls how multiple rows or columns of content are spaced and aligned within a container when there is extra space in the cross-axis (vertical for rows, horizontal for columns).

Click to reveal answer
beginner
Name three common values of align-content and what they do.
  • flex-start: Packs rows/columns toward the start of the container.
  • center: Packs rows/columns in the center with equal space above and below.
  • space-between: Distributes rows/columns evenly with first at start and last at end.
Click to reveal answer
intermediate
When does align-content have an effect in a flex container?

It works only when there are multiple lines of flex items (i.e., when flex-wrap is set to wrap and items wrap onto new lines).

Click to reveal answer
intermediate
How is align-content different from align-items?

align-items aligns items within a single line along the cross-axis. align-content aligns multiple lines of items when there is extra space.

Click to reveal answer
beginner
What CSS layout methods support align-content?

align-content works with Flexbox and CSS Grid layouts.

Click to reveal answer
Which CSS property controls the spacing between multiple rows in a flex container?
Aalign-content
Bjustify-content
Calign-items
Dflex-wrap
When does align-content have no visible effect?
AWhen there are multiple lines of items
BWhen flex-wrap is set to wrap
CWhen flex items are in a single line
DWhen using CSS Grid
Which value of align-content distributes rows evenly with space between them?
Aspace-between
Bflex-start
Ccenter
Dstretch
What is the default value of align-content in a flex container?
Aspace-around
Bcenter
Cflex-start
Dstretch
Which CSS property aligns items inside a single row or column?
Ajustify-content
Balign-items
Calign-content
Dflex-direction
Explain how align-content works in a flex container with wrapped items.
Think about how rows or columns are spaced when they wrap.
You got /4 concepts.
    Describe the difference between align-content and align-items in CSS layouts.
    Consider how many lines of items each property affects.
    You got /4 concepts.