22/07/2026
CSS Flexbox in 30 Seconds! π€― flex: 0 0 33% Explained Simply
Ever seen this line in CSS?
flex: 0 0 33%;
At first glance it looks confusing... but it's actually very simple! π
β
First 0 β flex-grow
Your item will NOT grow, even if extra space is available.
β
Second 0 β flex-shrink
Your item will NOT shrink, even if the container becomes smaller.
β
33% β flex-basis
Each item starts with 33% width of the container.
π‘ Easy Formula to Remember
β Don't Grow
β Don't Shrink
β
Take 33% Width
That's why 3 items fit perfectly in one row, each taking about one-third of the available width. item{
flex: 0 0 33%;
}
Whenever you see
flex : grow shrink basis;
Just read it like this:
Grow | Shrink | Width
Once you understand these three values, Flexbox becomes much easier to use. π
π¬ Question for You:
Which CSS topic should I explain next?
1οΈβ£ justify-content
2οΈβ£ align-items
3οΈβ£ flex-wrap
Comment your answer below! π
β€οΈ Follow K2infocom for simple Programming, Python, DataScience Web Development, CSS, JavaScript, React, and .NET tutorials explained in an easy way.