--- id: 587d78ae367417b2b2512afd title: Use the flex-basis Property to Set the Initial Size of an Item challengeType: 0 videoUrl: 'https://scrimba.com/p/pVaDAv/c3d9nCa' --- ## Description
The flex-basis property specifies the initial size of the item before CSS makes adjustments with flex-shrink or flex-grow. The units used by the flex-basis property are the same as other size properties (px, em, %, etc.). The value auto sizes items based on the content.
## Instructions
Set the initial size of the boxes using flex-basis. Add the CSS property flex-basis to both #box-1 and #box-2. Give #box-1 a value of 10em and #box-2 a value of 20em.
## Tests
```yml tests: - text: The #box-1 element should have a flex-basis property. testString: assert($('#box-1').css('flex-basis') != 'auto', 'The #box-1 element should have a flex-basis property.'); - text: The #box-1 element should have a flex-basis value of 10em. testString: assert(code.match(/#box-1\s*?{\s*?.*?\s*?.*?\s*?flex-basis:\s*?10em;/g), 'The #box-1 element should have a flex-basis value of 10em.'); - text: The #box-2 element should have the flex-basis property. testString: assert($('#box-2').css('flex-basis') != 'auto', 'The #box-2 element should have the flex-basis property.'); - text: The #box-2 element should have a flex-basis value of 20em. testString: assert(code.match(/#box-2\s*?{\s*?.*?\s*?.*?\s*?flex-basis:\s*?20em;/g), 'The #box-2 element should have a flex-basis value of 20em.'); ```
## Challenge Seed
```html
```
## Solution
```html
```