CSS Table Pagination Footer

A data table footer with a rows-per-page select, a "11–20 of 97" range and previous/next buttons.

  • pagination
  • data table
  • rows per page
  • range
  • admin
HTML
<div class="table-pager">
  <label>Rows
    <select>
      <option>10</option>
      <option>25</option>
      <option>50</option>
    </select>
  </label>
  <span>11–20 of 97</span>
  <nav aria-label="Pagination">
    <a href="#" aria-label="Previous page">‹</a>
    <a href="#" aria-label="Next page">›</a>
  </nav>
</div>
CSS
.table-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px 18px;
  box-sizing: border-box;
  padding: 10px 12px;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  font: 13px system-ui, sans-serif;
}

.table-pager label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-pager select {
  padding: 4px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
}

.table-pager nav {
  display: flex;
  gap: 4px;
}

.table-pager a {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  color: #0f172a;
  font-size: 18px;
  text-decoration: none;
}

.table-pager a:hover {
  background: #f1f5f9;
}

.table-pager a:focus-visible,
.table-pager select:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 1px;
}

About this CSS Table Pagination Footer

This CSS Table Pagination Footer is 54 lines of pure CSS (0.9 KB) with no JavaScript and no dependencies. It uses CSS Grid, Flexbox and keyboard focus styles. It works in current versions of Chrome, Edge, Safari and Firefox. It works in any stack: plain HTML, React, Vue, Svelte, Astro, WordPress or Webflow.

CSS features used

Customize it

The colors in this snippet. Search and replace them to match your brand:

  • #e2e8f0
  • #ffffff
  • #475569
  • #cbd5e1
  • #0f172a
  • #f1f5f9
  • #2563eb

How to use this table pagination footer

  1. Copy the HTML and paste it where you want the element to appear.
  2. Copy the CSS into your stylesheet, or inside a <style> tag.
  3. Keep the .table-pager class name, or rename it in both places. Then tweak colors, sizes and timing to match your design.
  4. Using React or Next.js? Change class to className in the HTML. The CSS works as is, including in Tailwind projects (put it in your global stylesheet).

Building with an AI tool?

“Copy for AI” copies a short prompt for Cursor, Claude Code, Lovable, Bolt or v0. Your AI tool opens the Markdown version of this snippet and reads the HTML, CSS and setup notes there. If your tool can't open links, with the code instead. More ways to use copy CSS with AI.

Feedback