CSS Flexbox Quiz

Create an account and save your quiz results

Login and save your results

OR

Question 1/15

How do you hide an element yet maintain its space in a flex container?

Select your answer

Question 2/15

If two flex items have the same flex-grow value but different flex-shrink value, how are they affected when reducing the container's available space?

Select your answer

Question 3/15

What is the effect of setting flex-direction: column; on a flex container?

Select your answer

Question 4/15

What is a benefit of using CSS Flexbox for layout compared to CSS Grid Layout?

Select your answer

Question 5/15

Which property on a flex item allows it to be individually aligned on the cross axis overriding the container's align-items value?

Select your answer

Question 6/15

What CSS value is used by the align-items property to stretch flex items to fill the container on the cross axis?

Select your answer

Question 7/15

Which CSS property defines the main axis of a flex container?

Select your answer

Question 8/15

Which property allows you to specify the amount of space that flex items can grow relative to each other?

Select your answer

Question 9/15

How can you reverse the order of flex items in a column direction?

Select your answer

Question 10/15

What is the effect of flex: auto; on a flex item?

Select your answer

Question 11/15

How do you center a flex item horizontally and vertically within a flex container?

Select your answer

Question 12/15

What is the purpose of align-content: center; in a flexbox layout?

Select your answer

Question 13/15

What is the significance of using the auto-fill function in combination with CSS Grid but not with Flexbox?

Select your answer

Question 14/15

Which CSS property is used to specify whether the flex items are forced into a single line or can be wrapped onto multiple lines?

Select your answer

Question 15/15

Which statement is true regarding the flex shorthand property?

Select your answer

Your Results

You did not answer any questions correctly.

Your Answers

Question 1/15
😊 Your answer was correct 🙁 Your answer was incorrect
How do you hide an element yet maintain its space in a flex container?

Available answers

Using visibility: hidden; will hide the element visually but still keep its occupied space allotted in the layout.
Question 2/15
😊 Your answer was correct 🙁 Your answer was incorrect
If two flex items have the same flex-grow value but different flex-shrink value, how are they affected when reducing the container's available space?

Available answers

When reducing space, flex items with identical flex-grow and different flex-shrink values will shrink at different rates, prioritizing the item with the larger shrink factor to decrease first.
Question 3/15
😊 Your answer was correct 🙁 Your answer was incorrect
What is the effect of setting <code>flex-direction: column;</code> on a flex container?

Available answers

By setting flex-direction: column;, you layout the flex items vertically in a column direction within the flex container.
Question 4/15
😊 Your answer was correct 🙁 Your answer was incorrect
What is a benefit of using CSS Flexbox for layout compared to CSS Grid Layout?

Available answers

CSS Flexbox is advantageous for simple, one-dimensional layouts, making it easier to align items in a single line or column, whereas Grid is better for complex, two-dimensional layouts.
Question 5/15
😊 Your answer was correct 🙁 Your answer was incorrect
Which property on a flex item allows it to be individually aligned on the cross axis overriding the container's align-items value?

Available answers

The align-self property allows a flex item to override the flex container's align-items value, letting it be aligned individually on the cross axis.
Question 6/15
😊 Your answer was correct 🙁 Your answer was incorrect
What CSS value is used by the <code>align-items</code> property to stretch flex items to fill the container on the cross axis?

Available answers

The value stretch for the align-items property stretches the flex items to fill the container on the cross axis.
Question 7/15
😊 Your answer was correct 🙁 Your answer was incorrect
Which CSS property defines the main axis of a flex container?

Available answers

The flex-direction property in CSS defines the direction the flex items are placed in the flex container, which is known as the main axis.
Question 8/15
😊 Your answer was correct 🙁 Your answer was incorrect
Which property allows you to specify the amount of space that flex items can grow relative to each other?

Available answers

The flex-grow property determines how much a flex item will grow relative to the rest of the flex items when there is extra space in the container.
Question 9/15
😊 Your answer was correct 🙁 Your answer was incorrect
How can you reverse the order of flex items in a column direction?

Available answers

Setting flex-direction: column-reverse; on a flex container reverses the order of items in a vertical column.
Question 10/15
😊 Your answer was correct 🙁 Your answer was incorrect
What is the effect of <code>flex: auto;</code> on a flex item?

Available answers

The flex: auto; shorthand is a combination of flex: 1 1 auto; meaning the item will take up available space but will also shrink when limited space is available.
Question 11/15
😊 Your answer was correct 🙁 Your answer was incorrect
How do you center a flex item horizontally and vertically within a flex container?

Available answers

To center a flex item horizontally and vertically within a flex container, you use justify-content: center; and align-items: center; on the flex container.
Question 12/15
😊 Your answer was correct 🙁 Your answer was incorrect
What is the purpose of <code>align-content: center;</code> in a flexbox layout?

Available answers

The align-content: center; property vertically centers flex lines inside the container if there is extra space in the cross axis.
Question 13/15
😊 Your answer was correct 🙁 Your answer was incorrect
What is the significance of using the <code>auto-fill</code> function in combination with CSS Grid but not with Flexbox?

Available answers

While the auto-fill function helps automatically adjust the number of columns/rows based on available space in CSS Grid, Flexbox operates independently without such a function.
Question 14/15
😊 Your answer was correct 🙁 Your answer was incorrect
Which CSS property is used to specify whether the flex items are forced into a single line or can be wrapped onto multiple lines?

Available answers

The flex-wrap property is used to specify whether the flex items should wrap or not when they run out of space in the flex container.
Question 15/15
😊 Your answer was correct 🙁 Your answer was incorrect
Which statement is true regarding the <code>flex</code> shorthand property?

Available answers

The flex shorthand property allows you to set flex-grow, flex-shrink, and flex-basis in a single line for a flex item.