To make an HTML element behave as a grid container, you have to set the `display`property to `grid` or `inline-grid`
🔹 The grid-template-columns Property
The `grid-template-columns` property defines the number of columns in your grid layout, and it can define the width of each column.
Example👇
🔹The grid-template-rows Property
The `grid-template-rows` property defines the height of each row.
Example👇
🔹 The justify-content Property
The `justify-content` property is used to align the whole grid inside the container.
Example👇
🔹The align-content Property
The `align-content` property is used to *vertically* align the whole grid inside the container.
Example👇
if you enjoyed this thread, please like, comment, and retweet the opening tweet.
🔹Follow @codemarch
🔹You can also check our HTML & CSS Visual Treat!😍for more!!! codemarch.gumroad.com/l/hxazr
• • •
Missing some Tweet in this thread? You can try to
force a refresh
By default, a container has one grid item for each column, in each row, but you can style the grid items so that they will span multiple columns and/or rows.
🔶 The grid-column Property:
The `grid-column` property defines on which column(s) to place an item.
You define where the item will start, and where the item will end.
The CSS Grid Layout Module offers a grid-based layout system, with rows and columns, making it easier to design web pages without having to use floats and positioning.
To make an HTML element behave as a grid container, you have to set the `display` property to `grid` or `inline-grid`
🔹 Grid Elements
A grid layout consists of a parent element, with one or more child elements.