HiveBrain v1.2.0
Get Started
← Back to all entries
snippetcssTip

Flexbox Cheat Sheet

Submitted by: @import:30-seconds-of-code··
0
Viewed 0 times
flexboxcheatsheetcss

Problem


  • display: flex or display: inline-flex: creates a flex context (or an inline flex context) for direct children of this element
  • flex-direction determines the main and cross axis for the container, valid values are:


- row (default): horizontal, in the direction of writing (left to right for English)
- row-reverse: horizontal, in the opposite direction of writing (right to left for English)
- column: vertical, top to bottom

Solution

- row (default): horizontal, in the direction of writing (left to right for English)
- row-reverse: horizontal, in the opposite direction of writing (right to left for English)
- column: vertical, top to bottom
- column-reverse: vertical, bottom to top
  • flex-wrap determines if flex items will try to fit in one line, valid values are:


- nowrap (default): all flex items will be on one line

Context

From 30-seconds-of-code: flexbox-cheatsheet

Revisions (0)

No revisions yet.