Shopify Tables Gone Wild? How to Make Your Excel Content Mobile-Friendly

Hey there, fellow store owners! Ever meticulously craft a detailed table in Excel, paste it into your Shopify page, and then cringe when you see it on a phone? You’re not alone. This is a super common headache, and it’s exactly what Laura (itslaura123) ran into recently in the Shopify Community forums. She had a detailed spreadsheet, likely full of important product specs or comparison data, that looked great on desktop but completely overflowed on mobile, chopping off crucial columns.

Laura was using the Ritual 3.2.1 theme and, like many of us, didn't want to mess with the core page template for fear of affecting other pages. She just wanted her table to fit, even if it meant slightly smaller text. Sound familiar? Let’s dive into how the community tackled this and how you can apply these fixes to your own store.

The Mobile Table Tangle: Why It Happens

When you paste a table from Excel (or Google Sheets, etc.) into Shopify’s rich text editor, it often comes with fixed column widths embedded in the HTML. Desktops handle this fine because they have plenty of screen real estate. But on a narrow phone screen, those fixed widths don't shrink, causing the table to spill over the edge. You end up with content that's either cut off or requires awkward horizontal scrolling, which isn't the best user experience.

Laura's original problem perfectly illustrates this:

IMG_7411

Screenshot 2026-09-30 at 21.15.10

Initial Fix: Horizontal Scrolling (and its limitations)

One common suggestion, offered by Mustafa_Ali, is to wrap your table in a container that allows for horizontal scrolling. It’s a quick fix if you don't mind users having to swipe to see all columns.

How to Implement Horizontal Scrolling:

  1. Go to the page where your table is.
  2. In the rich text editor, click the < > (Show HTML) button to view the HTML source.
  3. Find your ...
    code.
  4. Wrap your table with this
    :

This approach makes the table scrollable. However, Laura found that for her table, even with this, "two columns are invisible on mobile, and require scrolling to the right side to view." This can happen when the table still tries to maintain its large desktop width, even within a scrollable container. Plus, some themes (like Ritual, as Taha_Dev pointed out) might already apply a similar scrolling behavior, so adding it again might not change much.

The Real Solution: Making Your Tables Truly Responsive

What Laura really wanted was for the table to shrink and fit, not just scroll. This is where custom CSS comes in to make your table adapt to the mobile screen size. Two excellent solutions emerged from the community.

Method 1: Ploqo's General CSS for Rich Text Editor Tables

Ploqo provided a straightforward, effective CSS snippet that targets tables within Shopify's rich text editor (.rte table) specifically for smaller screens. This is great because it means you don't have to touch your page template, keeping other pages safe.

Ploqo's Steps:

  1. From your Shopify admin, go to Online Store.
  2. Click Customize next to your current theme.
  3. In the theme editor, click the Theme settings gear icon in the bottom-left corner.

    Theme settings gear icon

  4. Open Custom CSS.
  5. Custom CSS section

  6. Paste this code into the box:
@media screen and (max-width: 749px) {
  .rte table {
    table-layout: auto !important;
    width: 100% !important;
  }
  .rte table col {
    width: auto !important;
  }
  .rte table th,
  .rte table td {
    width: auto !important;
    font-size: 12px !important;
    padding: 6px 4px !important;
  }
}
  1. Click Save.

    Save button

Ploqo even shared a great before-and-after:

Before

Before: last column cut off on mobile

After

After: whole table fits on mobile

This code ensures that on screens 749px wide or less, tables in your rich text editor will automatically adjust. It sets the table layout to auto, forces the width to 100%, and adjusts column widths, font size, and padding to help everything fit. Desktop view remains unchanged.

Method 2: Taha_Dev's Targeted CSS with a Custom Class

Taha_Dev offered a similar, slightly more targeted approach. Instead of applying the CSS to all rich text editor tables, this method uses a custom HTML class, meaning you can choose exactly which tables get this responsive treatment.

Taha_Dev's Steps:

  1. Open the specific page containing your table.
  2. Click the < > (Show HTML) button in the rich text editor.
  3. Find the
    you might have added (or just wrap your in a new one) and change its opening tag to:

    Ensure the closing is right after your

    tag.

    1. Go to Online Store > Customize > Theme settings (gear icon) > Custom CSS (just like in Ploqo's steps).
    2. Paste this code and save:
    @media screen and (max-width: 749px) {
      .fit-table table { table-layout: fixed; width: 100% !important; font-size: 12px; }
      .fit-table col, .fit-table th, .fit-table td { width: auto !important; white-space: normal !important; }
      .fit-table th, .fit-table td { padding: 6px 4px !important; overflow-wrap: break-word; }
      .fit-table tr, .fit-table thead { text-transform: none !important; }
    }

    Taha_Dev's solution specifically sets table-layout: fixed and includes white-space: normal !important; and overflow-wrap: break-word; which are key for allowing text within cells to wrap, preventing horizontal overflow. The text-transform: none !important; is a clever touch that turns off all-caps headers on mobile, maximizing space.

    Choosing Your Responsive Table Strategy

    Both Ploqo's and Taha_Dev's solutions are excellent for making your tables fit on mobile. If you have many tables pasted into rich text sections and want a quick, general fix for all of them, Ploqo's method is fantastic as it targets all .rte table elements. It's a "set it and forget it" for most cases.

    If you need more precision, or if Ploqo's general solution doesn't quite get you there, Taha_Dev's method using the .fit-table class gives you more control. You can selectively apply the responsive styling to only the tables that need it, without affecting others. The text-transform: none for headers is also a brilliant detail for maximizing space on smaller screens.

    No matter which you choose, always preview your changes on different mobile devices (or use your browser's developer tools) to ensure everything looks perfect. A quick heads-up: always back up your theme before making any code changes, just in case!

    It's awesome to see the community come together to solve these real-world problems. Laura's question sparked some truly helpful solutions that many of us can benefit from. Happy optimizing!

Share:

Use cases

Explore use cases

Agencies, store owners, enterprise — find the migration path that fits.

Explore use cases