Does centering with flexbox remove the effect of block divs?
Whenever I horizontally center a div inside a flexbox, the div just seems to lose the effect of being a block element. It doesn't take the entire line width anymore. Is that just how flexbox works?
3 Replies
when you use
display: flex
, the children of that element are no long block elements, they're now flex items
Part of that is the width is calculated in a very different wayIf you want a flex item to take the entire width, use the flex-basis property
Or use grid #depends it's default for children is to fill.