CSS Flashcards
Display Property
Specifies the display behavior (the type of rendering box) of an element.
display : inline;
Any height and width properties will have no effect
display : block;
It starts on a new line, and takes up the whole width
display : contents;
Makes the container disappear, making the child elements children of the element the next level up in the DOM
display : flex;
Displays an element as a block-level flex container
display : grid;
Displays an element as a block-level grid container
display : inline-block;
The element itself is formatted as an inline element, but you can apply height and width values
Box Model
The element’s content, padding, border, and margin determine the space occupied by the element and its relation to other elements in the page.
Margin Collapse
Top margin and bottom margin collapse and only the largest of the two is used.