How can I control the column space according number of elements with CSS grid

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


How can I control the column space according number of elements with CSS grid



For example, I'd like to use a class which has at the most 3 columns, but If I had just 2 elements, this row gonna align this elements to the center
Is it possible with css grid?



as in the example below



enter image description here





Use flexbox, not grid. The picture you linked is not in a grid layout.
– jhpratt
1 min ago









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Makefile test if variable is not empty

Will Oldham

Visual Studio Code: How to configure includePath for better IntelliSense results