CSS Grid gallery

Size
2,311 Kb
Views
6,072

How do I make an css grid gallery?

What is a css grid gallery? How do you make a css grid gallery? This script and codes were developed by Benjamin Réthoré on 05 January 2023, Thursday.

CSS Grid gallery Previews

CSS Grid gallery - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>CSS Grid gallery</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <section class='container'> <article class='item item--1'>1</article> <article class='item item--2'>2</article> <article class='item item--3'>3</article> <article class='item item--4'>4</article> <article class='item item--5'>5</article> <article class='item item--6'>6</article> <article class='item item--7'>7</article> <article class='item item--8'>8</article> <article class='item item--9'>9</article> <article class='item item--10'>10</article> <article class='item item--11'>11</article> <article class='item item--12'>12</article> <article class='item item--13'>13</article> <article class='item item--14'>14</article>
</section>
</body>
</html>

CSS Grid gallery - Script Codes CSS Codes

*, *:before, *:after { box-sizing: border-box;
}
body { background: #F4F4F4; padding: 16px;
}
.container { display: -ms-grid; display: grid; -ms-grid-columns: (260px)[5]; grid-template-columns: repeat(5, 260px); -ms-grid-rows: 145px; grid-template-rows: 145px; grid-gap: 8px; text-align: center; line-height: 145px; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
}
.item { background-color: #fff;
}
.item--5 { -ms-grid-column: 2; grid-column-start: 2; -ms-grid-row: 2; grid-row-start: 2; -ms-grid-row-span: 2; grid-row-end: span 2; line-height: 300px; background-color: #fa8;
}
CSS Grid gallery - Script Codes
CSS Grid gallery - Script Codes
Home Page Home
Developer Benjamin Réthoré
Username bnthor
Uploaded January 05, 2023
Rating 3
Size 2,311 Kb
Views 6,072
Do you need developer help for CSS Grid gallery?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Benjamin Réthoré (bnthor) Script Codes
Create amazing video scripts with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!