Horje
What is CSS Grid Layout ?

The CSS Grid Layout is a powerful two-dimensional layout system that allows you to design complex web layouts with rows and columns. It provides a more flexible and efficient way to create grid-based designs compared to traditional methods.

Note: An HTML element becomes a grid if that element sets display: grid; in style section or inline-grid.

Syntax

.class {
display:grid;
}

Features

  • Two-Dimensional Layout: CSS Grid allows you to define both rows and columns, creating a grid structure.
  • Responsive Design: Makes it easy to create responsive layouts by defining flexible units like fr (fractional unit) and using media queries.
  • Alignment and Spacing: Provides properties for precise alignment (justify-items, align-items) and control over spacing between grid items (gap).
  • Grid Areas: You can name grid areas and place items into specific named areas.



Reffered: https://www.geeksforgeeks.org


Web Technologies

Related
How to use the "calc" Function in CSS ? How to use the "calc" Function in CSS ?
What is the use of the HTML datalist Element ? What is the use of the HTML datalist Element ?
How to apply the Clearfix Hack in CSS ? How to apply the Clearfix Hack in CSS ?
How to make Element transparent in CSS ? How to make Element transparent in CSS ?
What is the purpose of using the <meta charset="UTF-8"> Tag ? What is the purpose of using the <meta charset="UTF-8"> Tag ?

Type:
Geek
Category:
Coding
Sub Category:
Tutorial
Uploaded by:
Admin
Views:
14