Home / Business Ready Pages / Docs Site

Docs Site CSS Template, Free with Live Demo

Free documentation site template for an API. Sidebar filter, code blocks with copy buttons, callouts, an options table and an on this page menu. Live demo. The example is Quarry, an API documentation site.

Open live demoDownload HTML fileView code on GitHub
Docs Site CSS template example: Quarry, an API documentation site

What is docs site?

A docs site needs to be easy to scan and easy to trust. A sidebar to find pages, a readable column in the middle, and an on this page menu on the right, like the docs of Stripe or Vercel.

Code blocks have a language label and a copy button. Tips sit in a colored callout, options are in a table, and the sidebar filter hides pages as you type.

Good for

  • API and developer docs
  • Product help centers
  • Open source project docs
  • Internal team wikis

What you get in this template

The key CSS

This is the part that makes the docs site look work. Copy it into your own project.

.layout { display: grid; grid-template-columns: 250px minmax(0, 1fr) 200px; }
aside.nav { position: sticky; top: 53px; height: calc(100vh - 53px); overflow-y: auto; }
.cb pre { background: #0f1420; color: #e6e9f0; border-radius: 10px; padding: 32px 16px 16px; overflow-x: auto; }
.cb pre code { background: none; padding: 0; }
.note { background: #eef6ff; border-left: 4px solid #0b6bcb; }

How to use it

  1. Click Download HTML file above.
  2. Open the file in any code editor, like VS Code.
  3. Change the text, colors and links to match your project. Colors are at the top of the style tag.
  4. Upload it to any host, such as GitHub Pages, Netlify or your own server. It is one file with no build step.

Questions people ask

Why use minmax(0, 1fr) for the content column?

It stops long code lines from stretching the column. The code block scrolls sideways instead.

How do I add syntax highlighting?

Wrap keywords and strings in spans with classes, as in the example, or add a library like Prism or Shiki for automatic highlighting.

Can this handle many pages?

Yes. Copy the file for each page, or use it as the layout in a static site generator like Eleventy or Astro.

More Business Ready Pages designs