What Are CSS Grids & Subgrids?

Why CSS Subgrid is a big deal and why we need it?

2 Likes

CSS added Flexbox and CSS Grids to its library in response to advances in website design and the need for a grid-based layout.

CSS Grids and CSS Flexbox have both become widespread website design techniques. Both are used to create a grid-like structure in the website’s user interface. CSS Grids make it very simple to place your elements and, ultimately, elements under elements.

However, there is a slight difference between flexboxes and grids. CSS Grids is a two-dimensional layout that spans both axes. On the other hand, CSS Flexbox lacks this ability and is only versatile enough to shift the layout in one direction. In a nutshell, both have benefits and drawbacks.

1 Like