Skip to the page content

Responsive tables

Seven ways to keep a table readable from a wide screen down to a phone. Try any of them at phone width.

7 tables

Today's Marlo orders

Every column fits on a wide screen. Below 760px of room, each order becomes its own small card: who and status first, then the items, then one quiet line of facts.

Stack to cards
Today's Marlo orders. Use the column buttons to sort.
Items
#18334 Sandra Franklinsandra.franklin@mail.example E-Gift Card, $250 × 4 7:42 am Paid $100.00
#18333 Benjamin Hartleybenjamin.hartley@mail.example Sculpted Shoulder Blazer × 3 and 3 more 7:31 am Packing $2,270.00
#18332 Annika Greenwood-Hartannika.greenwood@mail.example Leather Trench Coat 7:18 am Paid $136.00
#18331 Penelope Bradfordpenelope.ar@mail.example Leather Trench Coat × 2 · Chalk-Stripe Suit 7:05 am Packing $487.00
#18330 Christopher Vancechris.vance@mail.example Tiered Organza Dress × 6 6:52 am Shipped $714.00
#18329 Iva Blackwoodiva.blackwood@mail.example Draped Column Gown × 2 6:40 am Paid $858.00
#18328 Theodora Staffordtheo.sterling@mail.example Cat-Eye Sunglasses × 2 6:24 am Shipped $178.00
#18327 Cheryl Sorensencheryl.sorensen@mail.example Bar Loafers × 2 6:11 am Delivered $118.00
#18326 Phyllis Delaneyphyllis.delaney@mail.example Shield Sunglasses × 10 5:58 am Shipped $390.00
#18325 Candace Carpentercandace.carpenter@example.com Two-Tone Oxfords 5:47 am Refunded $52.00
#18324 Travis Daughertytravis.daugherty@mail.example Chalk-Stripe Suit × 2 5:30 am Delivered $378.00
#18323 Leslie Whitlockleslie.whitlock@mail.example Sculpted Shoulder Blazer × 4 5:16 am Paid $2,596.00
#18322 Eleanor Fairweathereleanor.fair@mail.example Draped Column Gown 4:58 am Packing $395.00
#18321 Sabrina Kavanaghsabrina.kavanagh@mail.example Tiered Organza Dress × 2 · Two-Tone Oxfords × 2 4:41 am Shipped $336.00
#18320 Georgia Webstergeorgia.whitmore@mail.example Shield Sunglasses × 2 4:20 am Delivered $78.00
#18319 Rodney Forbesrodney.fh@mail.example Sculpted Shoulder Blazer × 6 3:55 am Paid $3,894.00
#18318 Rochelle Fairbanksrochelle.fairbanks@mail.example Leather Trench Coat × 3 3:12 am Delivered $447.00
#18317 Patricia Pembertonpatricia.pemberton@mail.example Bar Loafers × 3 2:47 am Refunded $177.00

1–6 of 18 orders

Show code
<table class="table table-hover align-middle rt-stack">
  <td data-label="Customer">Sandra Franklin</td>
</table>

/* The frame, not the window, decides when rows turn into cards */
.rt-frame { container-type: inline-size; }
@container (max-width: 760px) {
  .rt-stack thead { display: none; }
  .rt-stack tr { display: flex; flex-wrap: wrap; }
  .rt-stack [data-label="Items"] { flex-basis: 100%; }
}

Accounts

Each column has a priority. As the room shrinks, city and last active go first, then plan and seat count. Name and MRR always stay.

Column priority

All columns shown

Accounts, with lower priority columns hidden on narrow screens
Plan City Last active
Oakhaven Studiobookings@oakhavenstudio.example Max Phoenix 85 Sep 26 $4,930.00
Avocet Roboticsbookings@avocetrobotics.example Pro Waco 34 Sep 23 $1,088.00
Copperleaf Designhello@copperleafdesign.example Basic Eugene 14 Sep 21 $210.00
Highpoint Outfitterspurchasing@highpointoutfitters.example Max Tacoma 52 Sep 26 $3,016.00
Harborline AIadmin@harborlineai.example Pro Tampa 26 Sep 22 $832.00
Lakeside Appareloffice@lakesideapparel.example Basic Madison 11 Sep 14 $172.00
Larchwood Studiosoffice@larchwoodstudios.example Pro Patricia 28 Sep 19 $896.00
Show code
<th data-rt-prio="3">City</th>
<td data-rt-prio="3">Phoenix</td>

@container (max-width: 720px) { [data-rt-prio="3"] { display: none; } }
@container (max-width: 460px) { [data-rt-prio="2"] { display: none; } }

Subscriptions

Only who, what state and when stay in the row. Add-ons, region, admin and billing wait one tap away, so nothing is lost on a phone.

Expandable rows

5 accounts, 1 needs attention

Subscriptions. Each row has a button that shows its details.
Details Account Status Renews
Oakhaven StudioMax, 85 seats, billed yearly Active Mar 1
Avocet RoboticsPro, 34 seats, billed yearly Active Jan 12
Polaris Running Co. GroupPro, 18 seats, billed monthly Paused Resumes Nov 1
Ironbridge FintechBasic, 18 seats, billed monthly Past due On hold
Evergreen LandscapingBasic, 9 seats, billed monthly Active Oct 6
Show code
<tr>
  <td><button aria-expanded="false" aria-controls="sub-1">…</button></td>
  …
</tr>
<tr class="rt-detail" id="sub-1" hidden>
  <td colspan="4"><dl class="rt-facts">…</dl></td>
</tr>

Visits completed by month

Twelve months of completed visits for eight accounts. The account name stays pinned while the months scroll sideways under it; the table grows with the page, so there is no inner vertical scroll. Each account's busiest month is in bold.

Sticky column

Oct 2025 to Sep 2026, completed visits

Completed visits by account and month, Oct 2025 to Sep 2026
Oct Nov Dec Jan Feb Mar Apr May Jun Jul Aug Sep
Oakhaven Studio 612 688 804 861 742 590 548 701 936 1082 1017 768 9,349
Highpoint Outfitters 388 431 497 528 466 372 351 446 602 671 644 470 5,866
Avocet Robotics 301 322 368 412 357 296 284 290 288 297 305 311 3,831
Harborline AI 244 182 131 118 126 198 287 352 401 428 409 316 3,192
Brightline Photography 275 284 331 262 258 271 279 288 293 301 296 289 3,427
Ironbridge Fintech 214 219 236 208 205 211 217 220 216 209 213 224 2,592
Evergreen Landscaping 118 64 22 9 14 71 196 254 238 201 187 162 1,536
Cornerstone Logistics 96 82 48 31 37 66 104 131 142 139 128 117 1,121
Show code
<div class="table-responsive rt-scroll-tall">
  <table class="table">
    <th scope="row" class="rt-sticky">Avocet Robotics</th>
  </table>
</div>

.rt-scroll-tall { border: 1px solid var(--basalt-edge); }
.rt-sticky { position: sticky; left: 0; }

Account invoices

When there isn't room for every column, the invoice number stays and the rest take turns. Step through them with the arrows.

Column pager
Account invoices
Invoice Account Issued Due Amount Status
#30574 Harborline AI Sep 26 Oct 10 $832.00 Due
#30573 Avocet Robotics Sep 24 Oct 8 $10,880.00 Paid
#30572 Larchwood Studios Sep 19 Oct 3 $896.00 Due
#30571 Millrace Ceramics Sep 12 Sep 26 $75.00 Overdue
#30570 Copperleaf Design Sep 9 Sep 23 $210.00 Paid
#30575 Lakeside Apparel Sep 30 Oct 14 $172.00 Draft
Show code
<td data-rt-col="2">Sep 26</td>

// Below 480px, show the first column plus one other
table.classList.toggle('is-paged', frame.clientWidth < 480);
cells.forEach((c) => { c.hidden = c.dataset.rtCol !== String(current); });

Marlo warehouse stock

Row padding tightens by itself when the table runs short of room. Click a stock count to change it, then press Enter.

Compact rows

2 items to reorder

Marlo warehouse stock. Stock counts are buttons you can edit.
Item In stock Reorder at Level
Sculpted Shoulder BlazerML-BLAZ 15 In stock
Draped Column GownML-GOWN 12 Low
Tiered Organza DressML-ORGZ 40 In stock
Leather Trench CoatML-TRCH 6 Out
Shield SunglassesML-SHLD 80 In stock
Chalk-Stripe SuitML-SUIT 10 In stock
Cat-Eye SunglassesML-CATE 10 In stock
Show code
<table class="table rt-density" data-density="auto">

@container (max-width: 560px) {
  .rt-density[data-density="auto"] > :not(caption) > * > * { padding: .4rem .5rem; }
}
.rt-density[data-density="compact"] { /* same as table-sm */ }

Visit types and flat rates

On a wide screen every detail has its own column. When room runs out, industry, crew and timing fold into one quiet line under the visit's name.

Fold columns

9 visit types

Visit types, flat rate per visit
Visit type Industry Crew On site Window Flat rate
Home care visitHome care · 1 carer · 90 min, 2-hour window Home care 1 carer 90 min 2-hour window $134.00
Care check-inHome care · 1 carer · 1 hour, 4-hour window Home care 1 carer 1 hour 4-hour window $89.00
Full-day respiteHome care · 2 carers · 8 hours, all day Home care 2 carers 8 hours Full day $1,850.00
Group dog walkPet care · 1 walker · 1 hour, 2-hour window Pet care 1 walker 1 hour 2-hour window $145.00
Puppy training, half dayPet care · 2 trainers · 4 hours, morning slot Pet care 2 trainers 4 hours Morning $1,200.00
Headshot sessionPhotography · 1 shooter · 90 min, 2-hour window Photography 1 shooter 90 min 2-hour window $115.00
Family photo shootPhotography · 1 shooter · 3 hours, 4-hour window Photography 1 shooter 3 hours 4-hour window $680.00
Office deep cleanCleaning · 3 cleaners · 4 hours, evening slot Cleaning 3 cleaners 4 hours Evening $420.00
Carpet cleaning, per roomCleaning · 2 cleaners · 45 min, 2-hour window Cleaning 2 cleaners 45 min 2-hour window $64.00
Show code
<th scope="row">Home care visit
  <span class="rt-fold-only">Home care · 1 carer · 90 min, 2-hour window</span>
</th>
<td data-rt-fold>Home care</td>

.rt-fold-only { display: none; }
@container (max-width: 700px) {
  .rt-fold [data-rt-fold] { display: none; }
  .rt-fold .rt-fold-only { display: block; }
}