- inline
- inline-block
- block
- none
- flex (IE 11+)
- grid (not well supported yet)
- float can also be considered a display type but is controlled from the float property
- Inlines next to other inline/inline-block elements
Tags such as b, i, span
- Will not respond to height or width values being set
- Vertical padding is problematic (will overflow to elements in the next line)
- Cannot have vertical margin
- Line height will be the tallest element in it. All will align to line base.
- Will inline next to other inline/inline-block elements
- img tag is kinda like that (although devtools will tell you otherwise)
- Will respond to height/width/padding/margin correctly
- Create a new line, ending the line before
- Inline elements coming after will start in a new line
- Not all elements can contain other elements (try styling an h1 inside a p)
- You can place block elements inside inline elements as of HTML5 but it’s not necessarily a good idea
- Offers great layout tools that solve problems with previous layout techniques
- Viewport centering
- Portrait/landscape agnostic
- Ability to change elements order easily
- IE11 +
- Works great with flex to create modern web layouts
- IE11 +
Made with Slides.com