You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

基于Zurb库的邮件模板在Firefox移动端布局异常求助

Fixing Responsive Email Table Layout Issues in Firefox Mobile (Zurb Foundation)

Hey there, let’s get this email table sorted out for Firefox mobile! The issue you’re seeing—where the "TOTAL" header gets pushed to a new row—usually boils down to a mix of Zurb Foundation class inconsistencies and Firefox’s strict handling of table layouts on mobile. Here’s how to fix it step by step:

1. Fix Class Name Inconsistencies

First, I spotted a typo in your column classes: the first <td> uses column (singular) instead of columns (plural). Zurb Foundation for Emails relies on the plural columns class to trigger its responsive grid behavior. Using the singular will break the grid calculation in Firefox, leading to misaligned columns.

2. Standardize Table Base Attributes

Add width="100%" and cellspacing="0" to your <table> tag. These attributes ensure the table fills its container and removes default spacing that can throw off responsive layouts in mobile browsers—Firefox is particularly picky about this.

3. Resolve Alignment & Content Overflow

  • Replace inline align attributes with Zurb’s built-in text alignment classes (like text-center/text-right) to avoid conflicts between HTML attributes and CSS styling.
  • Add word-break: break-word to your .desc class to prevent long text from pushing column widths beyond their defined grid sizes, which was likely forcing the "TOTAL" header onto a new line.

Modified Code Example

<table class="row" width="100%" cellspacing="0">
  <tbody>
    <tr>
      <td class="small-5 large-7 columns">
        <p class="heading-text">ITEM</p>
      </td>
      <td class="small-3 large-2 columns space text-center">
        <p class="heading-text">QTY</p>
      </td>
      <td class="small-4 large-3 columns space text-right">
        <p class="heading-text">TOTAL</p>
      </td>
    </tr>
    <tr>
      <td class="small-5 large-7 columns space">
        <h6>1613 | <span class="memo-text">Out</span></h6>
        <p class="desc" style="word-break: break-word;">The framework includes two typographic scalesone uses a narrow range of sizes.</p>
      </td>
      <td class="small-2 large-2 columns space text-center">
        <h6>15.00</h6>
      </td>
      <td class="small-5 large-3 columns space text-right">
        <h6>$394,567.00</h6>
        <p class="desc">10.00%</p>
        <p class="desc">$39,800.00</p>
      </td>
    </tr>
  </tbody>
</table>

Why This Works

  • The corrected columns class ensures Zurb’s grid system properly calculates column widths across breakpoints, including Firefox mobile.
  • width="100%" and cellspacing="0" eliminate unexpected spacing and ensure the table adapts to the mobile viewport without overflow.
  • word-break: break-word prevents long descriptions from forcing columns to expand beyond their allocated space, which was the main culprit behind the "TOTAL" header being pushed down.
  • Using Zurb’s text alignment classes instead of inline align attributes keeps styling consistent and avoids rendering conflicts in Firefox.

内容的提问来源于stack exchange,提问作者Nisha Patel

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.15 04:37:26