Photo filmstrip
A sideways rail of tall pictures with captions that snaps card by card. Scrolls with touch, trackpad or the keyboard. Use it for a gallery of five to eight photos when you do not want to give each a full row. It saves vertical space.
<section class="blk-section" aria-labelledby="blk-strip-title">
<div class="blk-container">
<header class="blk-head">
<div class="blk-head__main">
<h2 id="blk-strip-title">From the road</h2>
<p>Swipe or scroll sideways for more.</p>
</div>
</header>
<ul class="blk-strip" tabindex="0" aria-label="Photo strip">
<li class="blk-strip__item"><figure><div class="blk-strip__ph blk-strip__ph--a"></div><figcaption>First light over the harbour</figcaption></figure></li>
<li class="blk-strip__item"><figure><div class="blk-strip__ph blk-strip__ph--b"></div><figcaption>The market before it opens</figcaption></figure></li>
<li class="blk-strip__item"><figure><div class="blk-strip__ph blk-strip__ph--c"></div><figcaption>A long lunch on the terrace</figcaption></figure></li>
<li class="blk-strip__item"><figure><div class="blk-strip__ph blk-strip__ph--d"></div><figcaption>The last train home</figcaption></figure></li>
<li class="blk-strip__item"><figure><div class="blk-strip__ph blk-strip__ph--a"></div><figcaption>An evening walk</figcaption></figure></li>
</ul>
</div>
</section>.blk-strip { list-style: none; display: flex; gap: 14px; margin: 0 -24px; padding: 4px 24px 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 24px; scrollbar-color: var(--blk-accent) transparent; }
.blk-strip:focus-visible { outline: 3px solid var(--blk-accent); outline-offset: -3px; }
.blk-strip__item { flex: 0 0 72%; max-width: 360px; scroll-snap-align: start; }
.blk-strip figure { margin: 0; }
.blk-strip__ph { position: relative; overflow: hidden; aspect-ratio: 4 / 5; border-radius: var(--blk-radius); background: radial-gradient(120% 100% at 0% 0%, var(--ph, var(--blk-panel-1)), var(--blk-dark)); }
.blk-strip__ph--a { --ph: var(--blk-panel-1); }
.blk-strip__ph--b { --ph: var(--blk-panel-2); }
.blk-strip__ph--c { --ph: var(--blk-panel-3); }
.blk-strip__ph--d { --ph: var(--blk-panel-4); }
.blk-strip__ph > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.blk-strip figcaption { margin-top: 10px; font-size: .92rem; line-height: 1.45; color: var(--blk-muted); }
@media (min-width: 900px) { .blk-strip__item { flex-basis: 300px; } }How to customise it
- Add photos by putting
<img src="..." alt="...">as the first child of eachblk-strip__phbox. - The rail takes focus with the Tab key and then scrolls with the arrow keys.
- Make the pictures wider by changing
aspect-ratio: 4 / 5to3 / 2in the CSS. - Add or remove list items freely; the rail grows to fit.
Tokens it reads
--blk-accent--blk-panel-1--blk-panel-2--blk-panel-3--blk-panel-4--blk-dark--blk-muted--blk-radiusAdd the "Photo filmstrip" block from Product Scope Blocks (https://resources.productscope.uk/blocks/blocks/filmstrip) to my page. Link https://resources.productscope.uk/blocks/blocks/kit/blocks.css once. Paste the HTML from https://resources.productscope.uk/blocks/blocks/kit/blocks/filmstrip.html and replace the placeholder text with my real content. Do not change the class names, add inline styles or add scripts. To change colours or fonts, override the --blk- variables in my own CSS. Do not invent facts, clients or numbers.