DEV Community

Cover image for #CSS. Note for flexbox properties.
Ha Tuan Em
Ha Tuan Em

Posted on

#CSS. Note for flexbox properties.

All CSS Flexbox properties

This is a list of all the CSS flexbox properties that can be used to position elements in CSS. And I hope it will useful for you.

Properties can be applied to the container

.container {
   display: flexbox | inline-flex;
   flex-direction: row | row-reverse | column | column-reverse;
   flex-wrap: nowrap | wrap | wrap-reverse;
   flex-flow: <‘flex-direction’> || <‘flex-wrap’>
   justify-content: flex-start | flex-end | center | space-between | space-around;
   align-items: flex-start | flex-end | center | baseline | stretch;
   align-content: flex-start | flex-end | center | space-between | space-around | stretch;
}
Enter fullscreen mode Exit fullscreen mode

Properties can be applied to items/elements in the container :

.items {
   order: <integer>;
   flex-grow: <number>; /* default 0 */
   flex-shrink: <number>; /* default 1 */
   flex-basis: <length> | auto; /* default auto */
   flex: none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]
   align-self: auto | flex-start | flex-end | center | baseline | stretch;
}
Enter fullscreen mode Exit fullscreen mode

You can practice flexbox css in this website flexboxdefense. If you see this cool so you can donate if you want !

And thanks for reading !

Top comments (2)

Collapse
 
mikehu profile image
MikeHu

Nice Article

Collapse
 
hte305 profile image
Ha Tuan Em

Thanks ! Hope it's useful for you !