如何在時事通訊的 html 單元格中均勻分佈內容? (How to evenly distribute content across an html cell for a newsletter?)


問題描述

如何在時事通訊的 html 單元格中均勻分佈內容? (How to evenly distribute content across an html cell for a newsletter?)

This is a newsletter so its heavy on tables and can't use much CSS but I'm sure there must be a solution.

I have a design I'm working on with the title of the newsletter at the top. Directly under that I want it to read Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec. Directly under that will be the start of the first content section.

This is a snippet of what I've got so far but its not justifying how I want. I'm trying to find a solution to have those months evenly spread across the 450px width. If necessary I can put a table inside that row. I'm sure this is something simple I'm just not seeing.

<table>
    <tr><td width=10px></td><td width=450px>Title</td></tr>
    <tr><td width=10px>
    </td><td width=450px>
        <span style="text‑align: justify;">
                    Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
        </span>
    </td>
    <tr>
        <td style="background‑color: #5DB1E3;" width=10px>&nbsp;</td>
        <td style="background‑color: #4D4D4D;" width=450px><span style="color: #FFF;">Industry Updates</span></td>
    </tr>
    <tr><td width=10px>&nbsp;</td><td width=450px>

‑‑‑‑‑

參考解法

方法 1:

If you place it in a table with a set width, the cells inside will justify on their own.

<table width=450px>
  <tr>
    <td>Jan</td>
    <td>Feb</td>
    <td>Mar</td>
    <td>Apr</td>
    <td>May</td>
    <td>Jun</td>
    <td>Jul</td>
    <td>Aug</td>
    <td>Sep</td>
    <td>Oct</td>
    <td>Nov</td>
    <td>Dec</td>
  </tr>
</table>

Here it is in http://jsfiddle.net/QymYH/

Thanks,

Pedro

(by RyanPedro Estrada)

參考文件

  1. How to evenly distribute content across an html cell for a newsletter? (CC BY‑SA 3.0/4.0)

#html-email #html #html-table






相關問題

Outlook 2007/2010 中的 Vspace (Vspace in Outlook 2007/2010)

Outlook,gmail基本問題(導致代碼) (Outlook, gmail basic issue (caused the code))

Outlook 中的 HTML 電子郵件呈現 - VML (HTML Email Render in Outlook - VML)

Адправіць пошту HTML з дапамогай NAIL? (Send HTML mail with NAIL?)

支持所有郵件服務的 HTML 電子郵件生成 (HTML email generation that supports all mail services)

如何在時事通訊的 html 單元格中均勻分佈內容? (How to evenly distribute content across an html cell for a newsletter?)

發送預先電子郵件的最佳方式 (Best way for sending advance email)

在 Outlook 上隱藏移動表格 (Hide mobile table on outlook)

html emailer改變表格的位置 (html emailer shifting changing the position of tables)

電子郵件的可滾動表(沒有 div) (Scrollable table for e-mails (without a div))

如何在電子郵件中嵌入 Web 表單 (How to embed web form in email)

如何通過電子郵件訪問建立 QuickAssist 鏈接 (How to make a QuickAssist link through email access)







留言討論