Here is the sample code using which you can add as many rows and columns you want based on you data. In this example, I have defined a three-column layout. you can add as many columns as you wish by specifying the repeat() function.
Example: grid-template-column: repeat(3, 1fr) will do same thing as grid-template-columns: 1fr 1fr 1fr;
In the below example, the grid-template-columns property defines three columns for the grid container and every column has a fixed width of 1 fraction of the available space,
2
Answers
Here is the sample code using which you can add as many rows and columns you want based on you data. In this example, I have defined a three-column layout. you can add as many columns as you wish by specifying the repeat() function.
Example: grid-template-column: repeat(3, 1fr) will do same thing as grid-template-columns: 1fr 1fr 1fr;
In the below example, the grid-template-columns property defines three columns for the grid container and every column has a fixed width of 1 fraction of the available space,
You can use the bootstrap library, check this : https://getbootstrap.com/docs/5.0/layout/columns/