Binge On Code

Jun 8, 2023

150 readers

What is css grid – a brief introduction

You may have heard about the term css grid, with your peers or you may have heard the term in passing. This simple introduction will explain what it is.

To be able to understand what css grid is, it is best to know what it is not. Well, it is not a html element, that I give you for free.

The other important thing which it is not, is that it is not a bullet to solving all your css responsive issues.

So, what is it? Css grid is just like any other css attribute. However, this is an understatement, because it is more than that.

It is a means to providing flexibility and predictability when laying out your content, either with the aim of responsive design, or pixel perfect design.

First you will have to know what a css grid system. This grid system is a way by which a web page is divided into a number of columns and rows, waiting for content to be painted on them.

Think of it as a canvas, divided into columns and rows, awaiting for the brush to get into action.

Css grid system makes it possible to have equal, varying or dynamic columns or rows on a web page, but this is beyond this introduction.

It is with this ability that you can go a step further and build css grid responsive website, and we will get onto this maybe in a later tutorial.

Any grid system has columns and rows. The columns are vertical splits on a page, while the rows are horizontal splits on a page.

This way you can define how you want your items placed horizontally or vertically on the css grid system.

So, how about building a responsive css grid? Well, that is where media queries come into the picture.

With the combined effort of media queries and css grid, it is possible to build fully responsive websites that can adapt, look and feel different in a number of platforms.

So, always remember:

  • It is a row by column representation of a website.
  • It is not a html selector.
  • It does not automatically fix your responsive issues.
  • Thanks to this awesome css attribute, you can be able to build responsive websites.

Finally, all the best and feel free to check out the next episode of this awesome series! Until next time!

Happy coding!

Related Articles

CSS absolute vs CSS fixed and when to use either

With CSS position, the two common properties are CSS absolute and CSS fixed. This guide resolves the CSS absolute vs CSS fixed argument using a simple example.

Jun 8, 2023

Views 499

What is CSS flex and how do you use it?

CSS flex is an amazing addition to CSS layout list. We will discuss what it is in a few words, and give you a simple introduction to it.

Jun 8, 2023

Views 155

What is the difference between CSS grid and CSS flex?

CSS grid and CSS flex are the most recent CSS layout options, and these come with incredible benefits. However, these are not the same, as explained here.

Jun 8, 2023

Views 129

Angular JavaScript React CSS Django Python React Native Next JS State Management Django Rest Framework Unity