Free CSS template · Gallery
Photo Gallery
A photographer-first gallery where images lead and the chrome gets out of the way.
A modern 2026 rebuild of a long-running CSS Crème template: responsive, accessible, and framework-free. Preview it below, then copy the starter.
Design tokens
Install the theme
Building with shadcn/ui? This template's color system is published as a real theme — light and dark, OKLCH tokens, contrast checked. One command drops it into your project.
npx shadcn@latest add https://csscreme.com/r/t/photo_gallery_green.json :root {
--background: oklch(98.8% 0.000 89.9);
--foreground: oklch(29.1% 0.042 158.8);
--card: oklch(97.4% 0.002 165.1);
--card-foreground: oklch(29.1% 0.042 158.8);
--popover: oklch(97.4% 0.002 165.1);
--popover-foreground: oklch(29.1% 0.042 158.8);
--primary: oklch(69.6% 0.149 162.5);
--primary-foreground: oklch(15.2% 0.009 285.3);
--secondary: oklch(97.8% 0.001 197.1);
--secondary-foreground: oklch(29.1% 0.042 158.8);
--muted: oklch(97.8% 0.001 197.1);
--muted-foreground: oklch(55.3% 0.023 160.9);
--accent: oklch(84.5% 0.130 165.0);
--accent-foreground: oklch(15.2% 0.009 285.3);
--destructive: oklch(62.6% 0.193 23.0);
--destructive-foreground: oklch(15.2% 0.009 285.3);
--border: oklch(84.3% 0.008 164.9);
--input: oklch(84.3% 0.008 164.9);
--ring: oklch(69.6% 0.149 162.5);
--radius: 12px;
}
.dark {
--background: oklch(18.1% 0.016 157.0);
--foreground: oklch(98.3% 0.024 163.2);
--card: oklch(24.2% 0.029 156.1);
--card-foreground: oklch(98.3% 0.024 163.2);
--popover: oklch(24.2% 0.029 156.1);
--popover-foreground: oklch(98.3% 0.024 163.2);
--primary: oklch(69.6% 0.149 162.5);
--primary-foreground: oklch(15.2% 0.009 285.3);
--secondary: oklch(22.0% 0.024 156.8);
--secondary-foreground: oklch(98.3% 0.024 163.2);
--muted: oklch(22.0% 0.024 156.8);
--muted-foreground: oklch(78.5% 0.053 160.8);
--accent: oklch(84.5% 0.130 165.0);
--accent-foreground: oklch(15.2% 0.009 285.3);
--destructive: oklch(62.6% 0.193 23.0);
--destructive-foreground: oklch(15.2% 0.009 285.3);
--border: oklch(37.3% 0.027 161.7);
--input: oklch(37.3% 0.027 161.7);
--ring: oklch(69.6% 0.149 162.5);
} Grab the starter
A complete, responsive single-file page themed to this template. Copy it into an
index.html and open it. That's the whole setup.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Photo Gallery</title>
<style>
:root {
--bg: #0C140F; --surface: #14241A; --primary: #10B981;
--accent: #6EE7B7; --text: #ECFFF5; --muted: #9CC4AE;
}
* { box-sizing: border-box; margin: 0; }
body { font: 16px/1.6 Inter, system-ui, sans-serif; background: var(--bg); color: var(--text); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 80px 24px; }
h1 { font-size: clamp(2rem, 6vw, 3.4rem); line-height: 1.05; letter-spacing: -.02em; }
p { margin: 18px 0 0; color: var(--muted); font-size: 1.15rem; max-width: 52ch; }
.btn { display: inline-block; margin-top: 28px; padding: 13px 26px; border-radius: 12px;
background: var(--primary); color: #fff; text-decoration: none; font-weight: 600; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 48px; }
.card { background: var(--surface); border: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
border-radius: 16px; padding: 24px; }
</style>
</head>
<body>
<main class="wrap">
<h1>Photo Gallery</h1>
<p>A photographer-first gallery where images lead and the chrome gets out of the way.</p>
<a class="btn" href="#">Get started</a>
<div class="grid">
<div class="card">One</div><div class="card">Two</div><div class="card">Three</div>
</div>
</main>
</body>
</html> About the Photo Gallery template
Photo Gallery began as one of CSS Crème's most-linked free templates. We rebuilt it from scratch for 2026: modern, responsive CSS with no framework to untangle, custom properties for every color so a rebrand takes minutes, and markup that stays readable months later. The preview above is the real layout; the starter is the real code.
Want to push it further? Pull a different palette, round the corners in the border-radius tool, or see the system decoded in a breakdown.
More gallery templates: Photo Gallery, Photo Gallery Black, Photo Gallery Blue.