To achieve a grid layout with two contents in one row, and if there’s an odd number of contents, the odd one should be displayed in the center, you can use CSS Flexbox.

This code uses Flexbox to create a responsive grid layout with two items in each row