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

Multi tool use
Multi tool use
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.

P2,n4AMIkoMIE JI,LsLkPFmy,qIjmRDFLUotjJuBIIbi
Om9fK wCxT43aKznu5eMWH,dDeBZFqW92,O Xgysc79D0

Popular posts from this blog

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

Spring cloud config client Could not locate PropertySource

Makefile test if variable is not empty