DEV Community

Cover image for CSS Flex and Grid( Wired Part)
Noormohammad011
Noormohammad011

Posted on

CSS Flex and Grid( Wired Part)

Flex layout is a flexible box layout and is used for setting the length of flexible items and making complex layouts. Using flex layout we can align, items very easily. Flex layout is very responsive. Flex property stands for flex-grow, flex-shrink, flex-basis.
Difference between flex and grid:

  1. Flex is a one-dimensional layout on the other hand grid is a two-dimensional layout with row and column

  2. flex is designed for small-scale layout and the grid is designed for larger-scale layout.

  3. Flexbox can be controlled well than Grid
    Flex direction can be controlled vertically and horizontally But Grid automatically adjusts column and row.

Top comments (0)