By the way this method hooks on columns and doesn t need additional div s or inner containers.
Flex css space between items gutter.
Items are positioned with space between the lines.
Used on flex items.
Percentage the size of the gap between columns defined as a percentage.
Items are positioned with space before between and after the lines.
Modifies the behavior of the flex wrap property.
Items are positioned at the end of the container.
It doesn t require negative margins or padding hacks which will lead you to only struggle more.
Ever wanted to set a gutter between your flexbox items.
This is in my opinion the best way to do it.
Play it initial.
On passing this value to the property justify content the extra space is equally distributed between the flex items such that the space between any two flex items is the same and the start and end of the flex items touch the edges of the container.
Length the size of the gap between columns defined as a length.
Play it space between.
Specifies the order of a flexible item relative to the rest of the flex items inside the same container.
The justify content property is a sub property of the flexible box layout module.
A shorthand property for flex direction and flex wrap.
It helps distribute extra free space leftover when either all the flex items on a line are inflexible or are flexible but have reached their maximum size.
For all other layout types it is 0.
Play it center.
Distance between flexbox items.
It defines the alignment along the main axis.
Items are positioned at the center of the container.
Play it space around.
It is similar to align items but instead of aligning flex items it aligns flex lines.
The length property s value must be non negative.
Sets this property to.