Question 1/15
Question 2/15
Question 3/15
Question 4/15
Question 5/15
Question 6/15
Question 7/15
Question 8/15
Question 9/15
Question 10/15
Question 11/15
Question 12/15
Question 13/15
Question 14/15
Question 15/15
Question 1/15
The flex-shrink property is used to control how much a flex item should shrink if there is not enough space available along the main axis. Here is an example code:
.item { flex-shrink: 1; }
Question 2/15
The cross axis in CSS Flexbox is the vertical axis. It is perpendicular to the main axis and is defined by the align-items property. Here is an example code:
.container { display: flex; align-items: center; }
Question 3/15
The default value of the justify-content property in CSS Flexbox is flex-start. This means that items are aligned to the left side of the container.
Question 4/15
The main axis in CSS Flexbox is the horizontal axis. It is defined by the flex-direction property, which can be set to either row or row-reverse. Here is an example code:
.container { display: flex; flex-direction: row; }
Question 5/15
The align-items property is used to align flex items along the cross axis of the flex container. Here is an example code:
.container { display: flex; align-items: center; }
Question 6/15
The flex-grow property is used to control how much a flex item should grow if there is extra space available along the main axis. Here is an example code:
.item { flex-grow: 1; }
Question 7/15
The main difference between min-width and flex-basis is that min-width sets a minimum width for an item in a flex container, while flex-basis specifies the initial size of an item before any flex grow or shrink is applied.
min-width is a CSS property that sets the minimum width of an element, which is the smallest size the element can be. This property applies to the content area of the element, and does not include padding, borders, or margins. When used in a flex container, min-width can be used to ensure that an item does not shrink below a certain size.
On the other hand, flex-basis is a CSS property that specifies the initial size of an item in a flex container before any flex grow or shrink is applied. This property can be used to set the default size of an item, and is often used in combination with the flex-grow and flex-shrink properties to create flexible and responsive layouts.
Question 8/15
The flex-wrap property is used to control whether flex items are forced onto one line or can wrap onto multiple lines. Here is an example code:
.container { display: flex; flex-wrap: wrap; }
Question 9/15
The align-content property is used to align multiple lines of flex items along the cross axis when there is extra space in the container. Here is an example code:
.container { display: flex; flex-wrap: wrap; align-content: center; }
Question 10/15
The order property is used to set the order of a flex item relative to other flex items inside the same container. Here is an example code:
.item { order: 2; }
Question 11/15
The display property is used to create a flex container by setting its value to "flex" or "inline-flex". Here is an example code:
.container { display: flex; }
Question 12/15
The default value of the flex-direction property in CSS is row. This means that items inside a flex container are arranged horizontally from left to right.
Question 13/15
The justify-content property is used to set the space between flex items along the main axis of the flex container. Here is an example code:
.container { display: flex; justify-content: space-between; }
Question 14/15
The default value of the flex-shrink property is 1, which means that the item will shrink if necessary to fit within the container.
Example code:
.item { flex-shrink: 1; }
Question 15/15
align-self is a CSS property that allows you to control the alignment of a single flex item along the cross-axis, regardless of how the other items are aligned. The align-self property can be used on individual flex items within a flex container to override the default alignment set by the container's align-items property. It accepts the same values as align-items (i.e. center, flex-start, flex-end, baseline, and stretch) to align the item within its own flex line. Here is an example code:
.item { align-self: flex-end; }
This code aligns the individual flex item to the bottom of the cross-axis within its own flex line, regardless of the alignment set by the container.