Skip to content
Every tutorial here is 100% free — and always will be
LSLovableStudent

How do I fix tables on mobile?

Last checked 31 Aug 2026

Short answer

Wrap the table in a horizontally scrollable container, or ask Lovable to convert it into stacked cards on mobile — plain HTML tables rarely fit a phone screen without one of these changes.

Why tables break on mobile

A table with several columns is often wider than a phone screen. Left as-is, it either causes page-wide horizontal scroll or squashes columns unreadably.

Two standard approaches

Approach Best for Trade-off
Horizontal scroll container Data tables users need to compare (pricing, specs) Requires a scroll gesture; less discoverable
Card layout on mobile Simple row data (e.g. a list of items with 2-3 fields each) More rebuild work; loses tabular comparison

Scroll container (simplest)

Wrap the comparison table in a horizontally scrollable container on mobile only, so the rest of the page doesn't scroll horizontally — keep the table as normal columns on desktop.

This confines the scroll to the table itself (overflow-x-auto on a wrapper div), which is usually enough for pricing or spec tables.

Card layout (better UX, more work)

On mobile, replace the table with a stacked card per row, showing each column as a labelled field. Keep the table view on desktop.

This is worth the extra effort for tables users need to actually read carefully on a phone, rather than just glance at.

What usually goes wrong

  • Shrinking font size to force the table to fit — it becomes unreadable rather than fitting properly. Use a scroll container or cards instead.
  • Applying overflow-x-auto to the whole page instead of just the table wrapper — this can hide other overflow bugs elsewhere on the page.
  • Forgetting to test with real (longer) content — a table that fits with short placeholder text may still overflow once real data is in it.

Sources

Was this answer helpful?

Related questions

Website made, maintained and hosted by PromptSites.com

PromptSites logo