0
0
CSSmarkup~5 mins

Flex container in CSS - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a flex container in CSS?
A flex container is an element with display: flex; or display: inline-flex;. It arranges its child elements (flex items) in a flexible way, either in a row or column.
Click to reveal answer
beginner
How do you make an element a flex container?
You set its CSS display property to flex or inline-flex. For example: display: flex;
Click to reveal answer
beginner
What is the default direction of flex items inside a flex container?
The default direction is a horizontal row from left to right, controlled by flex-direction: row;.
Click to reveal answer
beginner
Name two common values for the display property that create a flex container.
The two common values are flex and inline-flex. flex makes a block-level flex container, inline-flex makes an inline-level flex container.
Click to reveal answer
beginner
Why use a flex container instead of normal block layout?
A flex container helps arrange items easily in rows or columns, align them nicely, and distribute space evenly. It adapts well to different screen sizes, making layouts flexible and responsive.
Click to reveal answer
Which CSS property turns an element into a flex container?
Aposition: flex;
Bfloat: left;
Cflex-direction: row;
Ddisplay: flex;
What is the default direction of flex items inside a flex container?
AColumn from top to bottom
BRow from left to right
CRow from right to left
DColumn from bottom to top
Which value of display creates an inline flex container?
Aflex-inline-block
Bflex-inline
Cinline-flex
Dinline-block-flex
What does a flex container help you do?
AArrange child elements flexibly in rows or columns
BAdd colors to text
CMake text bold
DHide elements
Which of these is NOT a property of a flex container?
Atext-decoration
Balign-items
Cflex-wrap
Djustify-content
Explain what a flex container is and how you create one in CSS.
Think about the CSS property that changes layout behavior.
You got /3 concepts.
    Describe the default layout direction of flex items inside a flex container and why it is useful.
    Consider how items line up by default.
    You got /3 concepts.