Coder Wrap provides free to use snippets Coder Wrap provides free to use snippets

Back to Common
Preview Source Code
Download
HTML
CSS
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}
body {
	background: linear-gradient(45deg, #190f2c, #200b30);
	padding: 15px;
}
img {
	max-width: 100%;
	height: auto;
	vertical-align: middle;
	display: inline-block;
}

/* Main CSS */
/* Main CSS */
.grid-wrapper {
	display: grid;
	grid-gap: 10px;
	grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
	grid-auto-rows: 600px;
	grid-auto-flow: dense;
}
.grid-wrapper > div {
	display: flex;
	justify-content: center;
	align-items: center;
}
.grid-wrapper > div > img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 5px;
}
.grid-wrapper .wide {
	grid-column: span 2;
}
.grid-wrapper .tall {
	grid-row: span 2;
}
.grid-wrapper .big {
	grid-column: span 2;
	grid-row: span 2;
}

Related Snippets

Leave a comment

Your email address will not be published. Required fields are marked *