innovationM
← Back to Blogs

Mobile

CSS GRID

InnovationM Admin 28 Oct 2021 2 min read
CSS GRID

CSS Grid is a powerful tool that allows for two-dimensional textures to be built on the web. This guide is designed as a tool to help you better understand and read the Grid, and is organized in a way that I think makes a lot of sense as you read.

Grid Container

   Create a grid container by setting the display item by grid value or inline-grid. All direct children of grid containers become grid objects.

   Like tables, grid layout enables the author to sync objects in columns and rows. However, many configurations are possible or easier with the CSS grid than were the case with tables. For example, children’s items in grid containers can place them on their own and therefore are actually intertwined and layered, similar to objects placed in CSS.

{

display: grid

}

 

Grid items are placed in rows by default and span the full width of the grid container.

Grid-template-columns:

The grid-template-columns CSS property defines the line names and track sizing functions of the grid, giving below.

{

grid-template-columns: 60px 60px ;

}

 

{

grid-template-columns: 1fr 2fr;

}

Grid-column-start:

The grid-column-start CSS property specifies a grid item’s start position within the grid column by contributing a line, a span, or nothing (automatic) to its grid placement. This start position defines the block-start edge of the grid area.

{

grid-column-start: auto;

}

{

grid-column-start: 2;

}

 

Grid-gap :

The gap CSS property sets the gaps (gutters) between rows and columns. It is a shorthand for row-gap and column-gap.

{  

display: grid;

grid-template-columns: auto auto;

grid-gap: 10px;

}

About the Author

InnovationM Admin

Contributor at InnovationM.

LinkedIn

Transform Your Ideas with Expert Guidance

icon
15+ Years of Expertise

Delivering high-impact solutions with years of industry experience.

icon
100+ Satisfied Clients

Helping contact industry software experts to achieve their brand goals.

icon
250+ In-House Team Members

A skilled team ready to tackle projects of any scale.

Book a consultation call with our experts today