In this tutorial, we look at how to make the first flex item full width inside a CSS Flexbox container.
This is as simple as targeting the first flex item, giving it a width of 100%—so it's the full width of its parent container—and then giving the flex container a property of "flex-wrap: wrap".
This allows any other flex items to wrap down to the next row, freeing up space for the first item to increase in size to full width.
After doing this, you're free to adjust the other flex items using "justify-content", "flex-grow", and other CSS Flexbox properties.
I hope you found this video helpful. If you have any questions, please leave them in the comments below and I'll do my best to answer as soon as possible.
TIMESTAMPS:
00:00 Introduction
00:26 Targeting the first flex item
01:10 Setting its width to 100%
02:24 Setting flex-wrap to "wrap"
03:16 Adjusting the other flex items
05:15 Summary
WATCH NEXT:
• CSS Flex Grow (flex-grow) Explained - [ Ссылка ]
• CSS Flex Basis (flex-basis) Explained - [ Ссылка ]
• How to Perfectly Center an Element using CSS Flexbox - [ Ссылка ]
![](https://i.ytimg.com/vi/vgypdpzOSzE/maxresdefault.jpg)