![]() |
You can easily make CSS grid items to auto height using grid-template-columns property in Tailwind CSS. Tailwind uses grid-col and grid-row property which is an alternative to the grid-template-columns property in CSS. The grid-template-columns property in CSS is used to set the number of columns and size of the columns of the grid. This class accepts more than one value in tailwind CSS all the properties are covered as in class form. The number of columns is set by the number of values given to this class. Grid Template Columns:
Syntax: <element class="grid grid-cols-number"> Contents... </element> Example 1: HTML
Output: Note: From the above output, you can observe that each row has a different height depending on max-height required by a grid of a particular row. Example 2: HTML
Output: |
Reffered: https://www.geeksforgeeks.org
CSS |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 10 |