codegurukool.com · Free coding tutorials & online compiler

Home › CSS Tutorial › Flex items

Flex items

Properties set on children.

flex-grow, flex-shrink, flex-basis, order and align-self.

Example code

<style>
.f{display:flex;gap:6px;background:#eee;height:100px}
.f div{background:#1b998b;color:#fff;padding:10px}
.g{flex-grow:1}.l{order:-1;align-self:flex-end}
</style>
<div class='f'><div>Fixed</div><div class='g'>Grows</div><div class='l'>First, bottom</div></div>

Run this code in the online editor

← Flex containerGrid container and items →