【发布时间】:2023-03-15 14:10:01
【问题描述】:
我想发送一封将在 Outlook 中打开的电子邮件。
在这封邮件中我想隐藏一些空的td
这是我的代码:
<td width=""10%"" style="overflow: hidden;display:none;mso-hide:all;font-size: 0;max-height: 0; line-height: 0;"></td>
我得到的是这样的:
这个td 就像它有 1 像素的高度,但没有隐藏。
编辑:添加完整表格
<table border=1 align=""right"" style=""width: 49.5%;font-family:calibri;font-size:10pt;border-collapse:separate;" +
@"border: 1px solid black;"">"
@"<tr><th style=""font-family:calibri;font-size:10pt;background-color:#DDD9C4;"">Localisation</th>" +
@"<th style=""font-family:calibri;font-size:10pt; background-color:#DDD9C4;"">Site</th>" +
@"<th style=""font-family:calibri;font-size:10pt; background-color:#DDD9C4;width : 10%;"">Etat</th>" +
@"<th style=""font-family:calibri;font-size:10pt;background-color:#DDD9C4;"">Commentaire</th> </tr>";
bodytable = bodytable + "<tr>" +
@"<td style=""background-color:" + GetLocalisationColor(itemtheme.NomTheme) + @""" rowspan=" + (itemlocation.Site.Count + 1) + ">" + itemlocation.NomLocalisation + "</td>" +
@"<td style=""overflow: hidden;display:none;mso-hide:all;font-size: 0;max-height: 0; line-height: 0;""></td>" +
@" <td width=""10%"" style=""overflow: hidden;display:none;mso-hide:all;font-size: 0;max-height: 0; line-height: 0;""></td>" +
@"<td style=""overflow: hidden;display:none;mso-hide:all;font-size: 0;max-height: 0; line-height: 0;""></td>" +
" </tr>";
【问题讨论】: