CSS Display
- •
What it is
- •
controls an element's box participation in its surrounding layout and the layout of its children
- •
- •
- •
Example
- •
an ordinary non-replaced inline box does not respond to width, height, and vertical margins like a block box.
- •
inline-blockparticipates inline while providing a box whose dimensions can be controlled. - •
inline-flexparticipates inline while laying out its children using flexbox. - •
display: contentsremoves the element’s principal box, not its DOM node; it can have semantic/accessibility implications.
- •
- •
Caution
- •
display: blockdoes not by itself create a new Block Formatting Context
- •
- •
Reference
- •
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/display
- •
- •