flexbox sheet code example

Example 1: flexbox in css

/* 
  Most Common Flexbox properties:

    display: flex; 
    flex-direction: row / column;     --> used to justify the direction of content
    flex-wrap: wrap;                  --> holds the content inside flexbox container

  These Properties are also part of flexbox and only apply on a container which contain flexbox property

  Justify content:
    center
    start
    end
    baseline
    space-around -->commonly used

  Align items:
    center  
    baseline
    
  fr = fill up any available space

*/

.flexbox {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-around;
    /* column-count: 2;
  columns: 2; */
}

Example 2: flexbox css

.container {
  align-content: flex-start | flex-end | center | space-between | space-around | space-evenly | stretch | start | end | baseline | first baseline | last baseline + ... safe | unsafe;
}

Example 3: flexbox css

.container {
  flex-flow: column wrap;
}

Example 4: flexbox in css

.container {
  flex-direction: row | row-reverse | column | column-reverse;
}

Tags:

Misc Example