r/webdev • • Jan 18 '23

CSS flex for speed learners.

6.5k Upvotes

100 comments sorted by

View all comments

1

u/TomatoAcid Jan 19 '23

What is “space around”? I noticed the B trying to stay at the center, but I don’t understand the A and C behavior

1

u/Candyvanmanstan Jan 19 '23

Take available extra space, allocate it as left/right spacing to each item ("around" each item)

That's why middle items have more space than the edge pieces. Space evenly works similar but allocates space so the middle pieces don't get "more" just because they have neighbors.