---
title: Flex-grow
---
# Flex-Grow
The flex-grow property is a flexbox property that allows you to specify the allocation of free space to containers within a flex-container. It provides a solution to all that unwanted space!
It'll turn your container from this
to this
What just happened?
Well, we added two things to the css syntax.
HTML
```html
1
2
``` CSS ```css body { display:flex; } p { flex-grow: 1; } ``` Two things happened 1. The parent container was converted into a flex-display by `display:flex` 2. The remaining "free space" was then allocated among the remaining p containers in an equal ration since each has a flex-grow property of 1. What happens if we have p containers with different flex-grow properties? Let's see an example. First let's create two paragraphs and enable display: flex;