Christmas delivery deadlines in HTML and CSS
The last order dates for delivery before Christmas, per shipping method, with the days left worked out from the visitor’s date.
Here is an excerpt of this component's code in HTML and CSS. The full code is free for members, ready to copy into your project.
This component also comes in
The code in HTML and CSS
<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Date limite de livraison avant Noël</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<main class="demo">
<section class="dld" data-dld aria-labelledby="dld-titre">
<p class="dld-eyebrow">Maison Ferrand · épicerie fine</p>document.querySelectorAll("[data-dld]").forEach((root) => {
const on = (el, type, fn) => el.addEventListener(type, fn);
const now = new Date();
let year = now.getFullYear();
// After Christmas, the countdown is for next year's.
if (now > new Date(year, 11, 25, 23, 59)) year += 1;
const day = (d) => new Date(d.getFullYear(), d.getMonth(), d.getDate()).getTime();
const hour = (d) => `${d.getHours()} h${d.getMinutes() ? String(d.getMinutes()).padStart(2, "0") : ""}`;
const long = new Intl.DateTimeFormat("fr-FR", { weekday: "long", day: "numeric", month: "long" });
let next = "";
root.querySelectorAll("[data-dld-row]").forEach((row) => {:root {
--dld-card: #ffffff;
--dld-text: #2a1d1a;
--dld-muted: #5c4d48;
--dld-line: #eadfdb;
--dld-accent: #9f1239;
--dld-open-bg: #dcfce7;
--dld-open-text: #14532d;
--dld-soon-bg: #ffedd5;
--dld-soon-text: #7c2d12;
--dld-closed-bg: #e7e5e4;
--dld-closed-text: #44403c;Free component: copy it freely, including for commercial projects.
Other e-commerce components in HTML and CSS
E-commerce components in HTML and CSS
A limited-time offer bar: countdown to a fixed date, one-click copyable promo code and a fallback message once the offer is over.
- Tailwind
- React
- CSS
- WordPress

A sales card showing the discount that grows with the cart amount (-10% from €50, -15% from €100…) with a progress bar towards the next tier.
- Tailwind
- React
- CSS
- WordPress

A Christmas gift guide filtered by budget and theme, with the number of ideas announced and an empty state offering to show everything again.
- Tailwind
- React
- CSS
- WordPress

A cart that shows live how much is left to add for free shipping, with a progress bar and recalculated totals.
- Tailwind
- React
- CSS
- WordPress

A colour and size picker for a product page: the visual, price and stock follow the choice, and sold-out sizes are disabled.
- Tailwind
- React
- CSS
- WordPress

Wishlist
FreeA wishlist for an online shop: add from product cards, a summary with total and removal, remembered in the browser.
- Tailwind
- React
- CSS
- WordPress