freeCodeCamp/guide/english/certifications/responsive-web-design/css-flexbox/use-the-flex-shorthand-prop.../index.md

17 lines
427 B
Markdown
Raw Normal View History

2018-10-12 19:37:13 +00:00
---
title: Use the flex Shorthand Property
---
## Use the flex Shorthand Property
While you can set `flex-grow`, `flex-shrink`, and `flex-basis` properties individually. if you ever need to see the values for all of them you can do it in one line using the following format `flex: flex-grow flex-shrink flex-basis;`.
Example:
```css
#box-1 {
background-color: dodgerblue;
flex: 2 2 150px;
height: 200px;
}
```