space between flex items code example
Example 1: css flex center
display: flex;
align-items: center;
justify-content: center;
Example 2: flexbox center and space between
.flexbox {
display: flex;
justify-content: space-between;
}
.flex-item {
margin: auto;
}
Example 3: add space between all html elements flex
#box {
display: flex;
flex-wrap: wrap;
gap: 10px 20px;
}
Example 4: space between flexbox
justify-content: space-between;
Example 5: add space between flex items
.flex-gap {
display: inline-flex;
flex-wrap: wrap;
}
.flex-gap > div {
margin: 6px;
}
Example 6: flexbox space between
justify-content: flex-start | flex-end | center | space-between | space-around | space-evenly