JSFiddle - React, Tailwind, and code Playground

by Chris Ball

HTML

<div class="things">

	<div class="thing">
		<img src="http://placehold.it/600x400">
	</div>

	<div class="thing">
		<img src="http://placehold.it/1200x400">
	</div>

	<div class="thing">
		<img src="http://placehold.it/400x400">
	</div>

	<div class="thing">
		<img src="http://placehold.it/400x700">
	</div>

	<div class="thing">
		<img src="http://placehold.it/400x1200">
	</div>

	<div class="thing">
		<img src="http://placehold.it/1200x1200">
	</div>

</div>

SCSS

* {
	margin: 0;
	padding: 0;
}

.things {
	display: grid;
	grid-column-gap: 1rem;
	grid-row-gap: 1rem;
	grid-template-columns: 1fr 1fr;
	width: 100%;
}

.thing {
	align-self: center;
	border: 1px solid red;
	position: relative;
}

img {
	align-self: center;
	display: block;
	height: auto;
	justify-self: center;
	position: relative;
	width: 100%;
}