--- id: 587d78ad367417b2b2512afb title: Use the flex-shrink Property to Shrink Items challengeType: 0 videoUrl: 'https://scrimba.com/p/pVaDAv/cd3PBfr' --- ## Description
So far, all the properties in the challenges apply to the flex container (the parent of the flex items). However, there are several useful properties for the flex items. The first is the flex-shrink property. When it's used, it allows an item to shrink if the flex container is too small. Items shrink when the width of the parent container is smaller than the combined widths of all the flex items within it. The flex-shrink property takes numbers as values. The higher the number, the more it will shrink compared to the other items in the container. For example, if one item has a flex-shrink value of 1 and the other has a flex-shrink value of 3, the one with the value of 3 will shrink three times as much as the other.
## Instructions
Add the CSS property flex-shrink to both #box-1 and #box-2. Give #box-1 a value of 1 and #box-2 a value of 2.
## Tests
```yml tests: - text: The #box-1 element should have the flex-shrink property set to a value of 1. testString: assert($('#box-1').css('flex-shrink') == '1', 'The #box-1 element should have the flex-shrink property set to a value of 1.'); - text: The #box-2 element should have the flex-shrink property set to a value of 2. testString: assert($('#box-2').css('flex-shrink') == '2', 'The #box-2 element should have the flex-shrink property set to a value of 2.'); ```
## Challenge Seed
```html
```
## Solution
```html
```