Display Properties
CSS display property defines how an element is shown on the webpage.
Common Display Properties
- display: block
Element takes full width and starts on a new line.
Examples: div, h1,p
- display: inline
Element takes only content width.
Examples: span ,a, b
- display: inline-block
Combination of inline + block.
- display: none
Element completely disappears
*Box-Sizing Property *:
box-sizing defines how the total width and height of an element are calculated
- box-sizing: content-box (Default)
Width only applies to content area.
- box-sizing: border-box
Padding and border are included inside width
Top comments (0)