Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<head>
<style>
#grid{
display: grid;
grid-template-areas: "one two three"; /* more style */
}
.griditems:nth-of-type(1){ grid-area: one; }
.griditems:nth-of-type(2){ grid-area: two; }
.griditems:nth-of-type(3){ grid-area: three;}
.griditems{
margin: auto; /* more style */
}
</style>
</head>
<body>
<div id="grid">
<img src="foo.com/img-1.jpg" class="griditems">
<img src="foo.com/img-2.jpg" class="griditems">
<img src="foo.com/img-3.jpg" class="griditems">
</div>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.