使用 Outlook 发送的电子邮件中的 ol 和 ul 标签出现问题

2023-11-24

所以我正在尝试创建一封 html 电子邮件,该电子邮件将通过 Outlook 发送出去。问题似乎出在 ol 和 ul 分组上,我不知道如何解决它。当我在点击发送按钮之前在浏览器或 Outlook 中查看 html 时,它看起来像这样:

https://i.stack.imgur.com/2D4Zt.jpg

但是,电子邮件显示为:

https://i.stack.imgur.com/ZkCiH.jpg

我并不关心间距,而是担心列表样式被取消。

额外信息:使用 Outlook 发送,在 Gmail Web 客户端中查看。另外,如果我在 Outlook 中查看它,它看起来不错。

有人要了html。干得好:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head>

<body style="margin: 0 auto;">

<table width="640" border="0" cellspacing="0" cellpadding="0" style="border:thin #e7e8e9 solid;">
  <tr>
    <td style="padding: 10px 25px;"><p style="text-align:right; color: #808285; font-family:Arial, Helvetica, sans-serif; font-size: 12px;">Problems viewing email? <a href="#" style="color: #0077c0;">View online version</a></p></td>
  </tr>
  <tr>
    <td style="background-color: #0077c0"><a style="border: none; margin: 0; padding: 0" href="#"><img style="border: none; margin: 0; padding: 0;" src="images/top-image.jpg" width="640" height="300" alt="The 2013 Health and Group Benefit Options are Here." border="0" /></a></td>
  </tr> 
  <tr>
    <td style="border-bottom:thin #e7e8e9 solid; padding: 20px 20px;">
        <h1 style="color: #0077c0; font-family:Arial, Helvetica, sans-serif; font-size: 20px; font-weight: normal; line-height: 1.5; margin: 0 0 20px">Annual Enrollment for Your 2013 Benefits Is Open</h1>
        <h2 style="color: #808285; font-family:Arial, Helvetica, sans-serif; font-size: 20px; font-weight: normal; line-height: 1.5; margin: 15px 0 10px; ">Overview</h2>
        <p style="color: #808285; font-family:Arial, Helvetica, sans-serif; font-size: 12px; font-weight: normal; line-height: 1.5; margin: 15px 0 10px;">The Annual Enrollment period for 2013 health and group benefits is open <span style="letter-spacing: 1px; color: #0077c0;">now through Friday, Nov. 16.</span> Log on to <a style="text-decoration: none; color: #0077c0;" href="#">Your Benefits Resources</a> to review your options and enroll. The online tools can help determine the option that best meets your and your family’s needs.</p>
    </td>
  </tr>
  <tr>
    <td style="border-bottom:thin #e7e8e9 solid; padding: 20px 0;">
        <h2 style="color: #808285; font-family:Arial, Helvetica, sans-serif; font-size: 20px; font-weight: normal; line-height: 1.5; margin: 0 0 10px 20px;">Who should enroll</h2>
        <ul style="margin: 0 45px; padding: 0; list-style-type:disc;">
            <li style="color: #808285; font-family:Arial, Helvetica, sans-serif; font-size: 12px; font-weight: normal; line-height: 1.5; margin: 10px 0;">Anyone who wants to change their benefits coverage for 2013.</li>
            <li style="color: #808285; font-family:Arial, Helvetica, sans-serif; font-size: 12px; font-weight: normal; line-height: 1.5; margin: 10px 0;">Anyone who wants to enroll in a Health Care or Dependent Care Flexible Spending Account for 2013.</li>
        </ul>
    </td>
  </tr>
  <tr>
    <td style="border-bottom:thin #e7e8e9 solid; padding: 20px 0;">
        <h2 style="color: #808285; font-family:Arial, Helvetica, sans-serif; font-size: 20px; font-weight: normal; line-height: 1.5; margin: 0 0 10px 20px;">If you don't enroll</h2>
        <ul style="margin: 0 45px; padding: 0; list-style-type:disc;">
            <li style="color: #808285; font-family:Arial, Helvetica, sans-serif; font-size: 12px; font-weight: normal; line-height: 1.5; margin: 10px 0; padding: 0;">Your 2013 benefits enrollment will default to the coverage most similar to your 2012 coverage.</li>
            <li style="color: #808285; font-family:Arial, Helvetica, sans-serif; font-size: 12px; font-weight: normal; line-height: 1.5; margin: 10px 0; padding: 0;">You won’t be signed up for Health Savings Account or Flexible Spending Account deductions. Health Savings Account and Flexible Spending Account elections do not carry over from year to year. </li>
        </ul>
    </td>
  </tr>
  <tr>
    <td></td>
  </tr>
  <tr>
    <td>
        <table width="640" border="0" cellspacing="0" cellpadding="0" style="background-color:#f1f1f2;">
          <tr>
            <td colspan="2" style="padding:20px 20px;"><h2 style="color: #808285; font-family:Arial, Helvetica, sans-serif; font-size: 20px; font-weight: normal; line-height: 1.5; margin:0; padding:0;">How to Enroll</h2></td>
          </tr>
          <tr>
            <td colspan="2">
              <table width="640" border="0" cellspacing="0" cellpadding="0" style="background-color: #0077c0;">
                <tr>
                  <td><img style="margin: 0; padding: 0" src="images/enroll-online.jpg" width="197" height="70" alt="Enroll online" border="0" /></td>
                  <td><a style="border: none; margin: 0; padding: 0" href="#"><img style="margin: 0; padding: 0" src="images/enroll-now-button.jpg" width="108" height="70" alt="Enroll now!" border="0" /></a></td>
                  <td><img style="margin: 0; padding: 0" src="images/enroll-by-phone.jpg" width="335" height="70" alt="Enroll by Phone" border="0" /></td>
                </tr>
              </table>
            </td>
          </tr>
          <tr>
            <td style="border-right:thin #e7e8e9 solid; width: 270px;">
                <ol style="margin: 15px 20px 0 40px; padding: 0; width: 260px; list-style-type:decimal;">
                    <li style="color: #808285; font-family:Arial, Helvetica, sans-serif; font-size: 12px; font-weight: normal; line-height: 1.5; margin: 10px 0;">Log on to <a style="text-decoration: none; color: #0077c0;" href="http://resources.hewitt.com/williams">Your Benefits Resources.</a> A log-on ID (your Social Security number) and password are required.</li>
                    <li style="color: #808285; font-family:Arial, Helvetica, sans-serif; font-size: 12px; font-weight: normal; line-height: 1.5; margin: 10px 0;">Use the online tools to compare your medical options to determine the best option for you and your family, and to estimate the amount to contribute to your Health Savings Account and Health Care and/or Dependent Care Flexible Spending Accounts. </li>
                    <li style="color: #808285; font-family:Arial, Helvetica, sans-serif; font-size: 12px; font-weight: normal; line-height: 1.5; margin: 10px 0;">Make your choices online.</li>
                    <li style="color: #808285; font-family:Arial, Helvetica, sans-serif; font-size: 12px; font-weight: normal; line-height: 1.5; margin: 10px 0;">Print your confirmation statement. You will also receive a confirmation of your enrollment at the home address on file. </li>
                </ol>
            </td>
            <td valign="top" style="width:280px; margin: 0 20px 0 20px;"><p style="color: #808285; font-family:Arial, Helvetica, sans-serif; font-size: 12px; padding: 0 20px; font-weight: normal; line-height: 1.5; margin: 15px 0;">Call the Williams Benefits Center (at Hewitt) at <span style="color: #0077c0;">866-</span> or <span style="color: #0077c0;">866-9</span> weekdays from 8am to 5pm CT.</p>  </td>
          </tr>
        </table>
    </td>
  </tr>
  <tr>
    <td style="padding: 10px 20px;"><p style="font-size: 10px; color: #939598; font-family:Arial, Helvetica, sans-serif; font-weight: normal; line-height: 1.5;">©2012 Williams Companies Inc</p></td>
  </tr>
</table>


</body>
</html>

在电子邮件中制作项目符号列表的最佳方法是用表格来模仿它们。点击此处获取 JSFiddle.

<table cellspacing="0" cellpadding="0">
    <tr><td width="20" align="center" valign="top">&bull;</td>
        <td width="200" align="left" valign="top">Text text text text text text</td>
    </tr>
    <tr><td align="center" valign="top">&bull;</td>
        <td align="left" valign="top">Really really really long and wrapping text here text here text here text here text here </td>
    </tr>
</table>

请务必使用align和valign =“top”,以便项目符号与长的换行文本的顶部保持齐平。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

使用 Outlook 发送的电子邮件中的 ol 和 ul 标签出现问题 的相关文章

  • 每 2 行后使 html 表格的边框变厚

    我创建了一个包含一些内容的表 其中有 12 行和 2 列 我想显示边框 但每 4 行之后 我想将水平边框设置为比正常情况更粗 怎么做 请在这里帮忙 试试这个选择器 table tr nth of type 4n td border bott
  • 删除特定数据表上的所有边框

    我需要使用 PrimeFaces 隐藏一个数据表的所有边框 而不是全部 我尝试了很多事情 但没有人奏效 有谁知道该怎么做 我已将以下样式 单独 应用于ui datatable class border hidden important bo
  • 如何将 HTML 转换为 Markdown?

    我有一个类似 stackoverflow 的网站 有一个文本区域 人们可以在其中写答案 我用这个 PHP 库 http parsedown org 转换降价 我的意思是我使用该函数来转换 italic to i italic i inclu
  • 理解 z-index:该元素如何出现在其父级同级元素的前面?

    为什么当我删除时红色 div 位于绿色 div 前面z index from wrapperRed 感觉像z index是沿着链条向上继承的 如果我改变z index将绿色 div 更改为 6 即使删除第一句中描述的行后 它仍保留在红色 d
  • 单击导航项锚链接时如何关闭切换菜单

    请看我的FIDDLE http jsfiddle net ayhpp8ax 我有一个带有 响应式 导航菜单 带有指向页面上元素的锚链接 的 1 页网站 当浏览器视口小于特定宽度 在我的情况下为 767px 时 使用此 javascript
  • jQuery mobile 中的文本区域高度和宽度?

    我修复了 jQuery mobile 中文本区域元素的高度 并且在纵向中得到了完美的高度和宽度 但在横向中宽度没有放大 谁能帮我 提前致谢 HTML
  • html 电子邮件内的背景图像 css - Gmail 不支持

    我想向我的用户发送如下所示的带有背景图像 css 的 html 正文电子邮件 div style width 500px height 1000px background color black background image none
  • 网站在 iPhone 屏幕右侧显示空白区域

    我遇到问题http eiglaw com http eiglaw com iPhone 屏幕右侧显示约 25 像素宽的空白 边框 我在 stackoverflow 上研究了这个问题 这些帖子是相关的 但是当我尝试提供的各种解决方案时 我无法
  • 转义 h 轮廓

    因此 我一直在尝试找出在被较低级别的标题吸引后添加内容的最佳方法是什么 section h1 Title of Section h1 h2 Related 1 h2 h2 Related 2 h2 p I NEED THIS TO BE P
  • HTML W3C 有效元素 - DIV 在 TD 内有效吗?

    我正在和一位同事争论 但找不到证据证明我们俩都是对的 我之前已经看过给定标签的有效元素列表 但只是无法再次找到它 有人能指出我正确的方向吗 我对 XHTML 很好奇 但分歧具体在于 DIV 标签在 HTML 4 01 中的 TD 标签内是否
  • 两列表:一列尽可能小,另一列占据其余部分

    我在 div 中有一个 to columns 表 div table tbody tr td class action a a td td class content p Bigger text variable size p td tr
  • 按下回车键时不刷新页面

    我遇到了一些问题 只要表单中有输入 回车键就会触发页面刷新 下面的代码 如果按下回车并且文本区域 input 中没有输入任何文本 则不会刷新页面 但是如果按下回车并且 input中有输入或者光标位于文本区域 我不确定是什么触发了它 因为 s
  • 删除 IE9 边缘周围的 2px 灰色边框

    我正在尝试对这个网站进行编码 尝试关键字 并且我正在尝试找出如何删除这个阴影2px灰色边框延伸到 IE9 窗口的内部 至少顶部 左侧和底部 我的边距设置为零 因此所有页面元素都到达页面的最边缘 但使用 IE9 它们会停在这个灰色边框处 我没
  • javascript 选择自定义光标 (svg)

    我正在动态地将光标更改为悬停时的本地 svg element on mouseover function this css cursor url svgs pointer svg 9 30 auto 工作正常 但我想选择该 svg 来操纵其
  • 如何使用角度材料在具有可扩展行的表格中创建嵌套垫表

    我有以下数据 id c9d5ab1a subdomain wing domain aircraft part id c9d5ab1a info mimetype application json info dependent parent
  • -webkit-box-shadow 与 QtWebKit 模糊?

    当时有什么方法可以实现 webkit box shadow 的工作模糊吗 看完这篇评论错误报告 https bugs webkit org show bug cgi id 23291 我认识到这仍然是一个问题 尽管错误报告被标记为RESOL
  • 如何始终将焦点保持在文本框中

    我创建了一个包含两个 div 的 HTML 页面 左侧的 div 页面的 90 是 ajax 结果的目标 右侧的 div 页面的 10 包含一个文本框 该页面的想法是在文本框中输入零件编号 通过条形码扫描仪 并显示与该零件编号匹配的绘图 显
  • 如何使用 JavaScript 或 jQuery 克隆 HTML 元素的样式对象?

    我正在尝试克隆元素的样式对象 这应该允许我在更改后重置所述元素的样式 例如 el style left 50px curr style left 50px Modify the elements style The cloned style
  • 从 PHP 数组生成 HTML 表

    我不明白这一点 我需要解决看似简单的问题 但这超出了我的逻辑 我需要编写一个函数 table columns input cols 它将输出一个表 示例 input array apple orange monkey potato chee
  • css3按钮背景颜色无限过渡

    有没有办法仅使用 css3 使按钮的背景颜色从灰色渐变为蓝色 然后又回到灰色 一个很好的例子是默认操作按钮是可可 我知道这可以在 javascript 中完成 但我宁愿只使用 css 来完成此操作 您好 我已经通过 CSS3 动画制作了按钮

随机推荐

  • .NET Core SDK 版本 2.2.202 的 MSBuild 失败

    下载并安装 Visual Studio 2019 RC 后 我无法运行 msbuild 并收到以下错误 NET Core SDK 版本 2 2 202 至少需要 MSBuild 版本 16 0 0 MSBuild 当前可用的版本是 15 6
  • 如何向edittext添加文本

    我在填充编辑文本时遇到问题 使用以下代码我可以很好地设置文本 但是我想做的是添加到编辑文本中 例如 以下代码在我的编辑文本中显示 1 但如果我再次按下它 它只会将 1 替换为 1 依此类推 我需要的是如果我按四次它就会显示 1111 这是我
  • Cassandra - 合理的最大表数是多少?

    我是卡桑德拉的新手 据我了解 每个键空间可以存储的最大表数是 Integer Max Value 然而 如此大量的表从性能角度 速度 存储等 来看有何影响 对此有什么建议吗 虽然 Cassandra 中有大量表的合法用例 但这种情况很少见
  • 如何将 div 放在图像上?

    我试图在图像上放置一个 div 使其像标题一样直接位于图像之上 有时标题比其他时候长 所以我无法设置特定的 margin top px 因为有时标题的高度更长 我尝试了这个 链接的背景 黑色 没有显示 也像我刚才所说的那样 标题高度发生了变
  • Java 8:如何将 String 转换为 Map

    我有一张地图 Map
  • std::引用类型的可选特化

    Why std optional std experimental optional in libc 目前 没有针对引用类型的专门化 与boost optional 我认为这将是非常有用的选择 是否有一些对象参考maybe已经存在的对象中的
  • 如何结合锚点id进行分页

    我对 Ruby on Rails 非常陌生 在尝试修复公司网站上的一些错误时正在学习 我正在尝试对与特定锚点相结合的记录集合进行分页 即当用户单击下一页 上一页时 就会发生分页并且用户登陆页面的特定部分 这就是我的代码目前的样子 view
  • MSVC 中的分解

    如何在 MSVC 中取消名称解析 gcc中有abi cxa demangle函数 在 MSDN 中我发现了 UnDecorateSymbolName http msdn microsoft com ru ru library windows
  • 如何将多个 TFS 存储库拉入单个 Jenkins 作业中?

    我有一个仓库 有 2 个子文件夹 Repo project 和 Repo thirdparty 我需要将这两个都拉到 Jenkins 中进行单个构建 当然 我尝试只拉动 Repo 但这给了我一堆其他项目以及错误的民意调查 每次将任何东西签入
  • 如何在 R 和 ggplot2 中将绘图拟合到背景图像上

    我正在尝试适应背景图像上显示的绘图 由于清晰度的损失 我无法将图像拉伸太多 因此 我必须将绘图放在比绘图薄得多的背景图像上 我不知道怎么做 请参阅附图 这是示例 R 代码 library ggplot2 library readxl lib
  • React-Native:从 Firebase 存储下载图像

    预先信息 我仍然打开了一个 Firebase 项目 并且我仍然成功地使用 Firebase 数据库 So the firebase initializeApp config works 我在我的 Firebase Storage 文件夹中上
  • 仅从 JavaScript 中的 JSON 对象中提取值,而不使用循环

    有没有一种 很好 的方法可以从 json 对象中获取所有值 我不关心键 只需将值放入数组中 不使用循环 lang 是 JavaScript 这取决于你如何定义 循环 您可以使用以下命令提取属性Object keys进而map他们遵循自己的价
  • 将数据从堆栈溢出查询导入到 R 中的代码

    当我尝试回答 Stack Overflow 中有关 R 的问题时 我的大部分时间都花在尝试重建示例中给出的数据 除非问题作者足够好地将它们作为 R 代码提供 所以我的问题是 如果有人只是问一个问题并按以下方式给出他的样本数据框 a b c
  • 如何确定 macOS 10.14 强调色?

    MacOS 10 14 Mojave 具有深色界面风格和用户可选择的颜色强调 如何读取这些值并监听变化 编辑 现在 macOS 11 推出了具有自己独特配色方案的新 M1 iMac 我可以使用这样的 iMac 但无法确定强调色 它是黄色版本
  • 为什么默认参数构造函数被称为默认构造函数

    Class A public A int i 0 int k 0 default constructor WHY A int main A a This creates object using defined default constr
  • 使用R通过ggplot计算重叠密度图的面积

    如何获得重叠密度曲线下的面积 如何用R解决这个问题 这里有一个python的解决方案 计算两个函数的重叠面积 set seed 1234 df lt data frame sex factor rep c F M each 200 weig
  • nltk斯坦福NERTagger:如何获得不大写的专有名词

    我正在尝试使用斯坦福NERTagger 和nltk 从一段文本中提取关键字 docText John Donk works for POI Brian Jones wants to meet with Xyz Corp for measur
  • 使用 XSLT 重命名节点

    我正在尝试一些非常简单的事情 但由于某种原因它不起作用 基本上 我需要重命名 XML 文档中的一些节点 因此 我创建了一个 XSLT 文件来进行转换 下面是 XML 的示例 编辑 地址和地址元素出现在许多级别 这就是导致我不得不尝试应用 X
  • 如何在Notepad++中将所有字符串替换为每个字符串中包含的数字?

    我试图找到具有以下模式的所有值 value 4 value 403 value 200 value 201 value 116 value 15 并将其替换为范围内的值 我使用以下正则表达式来查找模式 d 我该如何更换 In Notepad
  • 使用 Outlook 发送的电子邮件中的 ol 和 ul 标签出现问题

    所以我正在尝试创建一封 html 电子邮件 该电子邮件将通过 Outlook 发送出去 问题似乎出在 ol 和 ul 分组上 我不知道如何解决它 当我在点击发送按钮之前在浏览器或 Outlook 中查看 html 时 它看起来像这样 htt