在格式化HTML简报时苦苦挣扎

时间:2023-01-14 15:05:15

I've been trying to compose a newsletter for the institute where I help out, but don't have extensive experience in using HTML. I was told that I need to use an online template for designing the newsletter, which is based in Everlytic (the mass-mail sending service), but after formatting everything and sending a preview to myself, I found that the table does not display as it should. For some reason, after certain columns, a few empty cells show up that do not show up in the WYSIWYG editor. I know they're not that reliable, but still.

我一直在努力为我所帮助的研究所撰写简报,但在使用HTML方面没有丰富的经验。有人告诉我,我需要使用在线模板设计时事通讯,该时事通讯基于Everlytic(群发邮件发送服务),但在格式化所有内容并向我自己发送预览后,我发现表格不显示为这应该。出于某种原因,在某些列之后,会出现一些空单元格,这些单元格未显示在WYSIWYG编辑器中。我知道他们不是那么可靠,但仍然。

在格式化HTML简报时苦苦挣扎

I've poked around the HTML, but I can't figure out what seems to be wrong? I suspect that the amount of columns the table is assigned to use is to blame, but I am very uncertain. I've included the HTML of the newsletter up until just past the point where the problem occurs.

我已经探讨了HTML,但我无法弄清楚什么似乎是错的?我怀疑表格分配使用的列数是责任,但我很不确定。我已经将新闻简报的HTML包括在内,直到问题发生的那一刻。

<html>
<head>
    <title></title>
</head>
<body>
    <style type="text/css"><!-- .grey {
color: #666; }
--></style>
    <table border="0" cellpadding="0" cellspacing="0" class="grey" width="704">
        <tbody>
            <tr>
                <td valign="top"><br>
                    <table border="1" cellspacing="0" height="2454" width="726">
                        <tbody>
                            <tr>
                                <td colspan="3"><img alt="" height="460" src="http://newsletters.stellenbosch-mail.com/users/assets/14/images/Header.jpg" width="694"></td>
                            </tr>
                            <tr bgcolor="#99CC66">
                                <td colspan="3">
                                    <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif" size="4">NEWSLETTER<br>
                                        <font size="1">May 2014</font></font></div>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <div align="justify"><br>
                                        <font face="Arial, Helvetica, sans-serif" size="2">Universiteite regoor die wêreld besef al hoe meer dat daar op verskillende maniere aandag gegee moet word aan die uitdagings van ons dag. Vrae in hierdie verband word selfs meer spesifiek as daar gesoek word na die rol wat graduandi speel as leiers in ons samelewing.<br>
                                        <br>
                                        Om hierdie vrae verder te vra en om te begin om antwoorde te vind, het die Universiteit van Stellenbosch (US) besluit om die Frederik van Zyl Slabbert Instituut vir Studenteleierskapsontwikkeling (FVZS Instituut) te vestig as ’n sentrale vennoot in die leer- en leefwêreld van studente. Die FVZS Instituut – die eerste van sy soort in Suid-Afrika – is in 2011 amptelik bekendgestel en bou op verskillende maniere voort op die nalatenskap van wyle dr Frederik van Zyl Slabbert.<br>
                                        <br>
                                        Hierdie nuusbrief bied 'n samevatting van die aktiwiteite van die FVZS-Instituut en nooi ons lesers uit om deel te neem daaraan om vrae te vra oor die kwessies van die dag en om saam met ons studente antwoorde te soek oor die kwessies van die dag. Geniet die nuusbrief!<br>
                                        <br>
                                        Leslie van Rooi</font></div>
                                </td>
                            </tr>
                            <tr>
                            </tr>
                            <tr>
                            </tr>
                            <tr>
                                <td bgcolor="#99CC66" colspan="2"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif" size="3">FVZS HONORARY LECTURE 2014 </font></font><font color="#99CC66" face="Verdana, Arial, Helvetica, sans-serif" size="2">.</font></td>
                            </tr>
                            <tr>
                                <td valign="top" width="52%">
                                    <p><br>
                                        <span style="font-size:14px;"><span style="font-family:arial,helvetica,sans-serif;"><strong>Honorary Lecture informs new generation of active citizens</strong></span></span><br>
                                        <span style="font-size:12px;"><span style="font-family: arial,helvetica,sans-serif;">Message from DR LESLIE VAN ROOI, Head of the FVZS Institute for Student Leadership Development.<br>

Anyone have any idea how to fix this?

任何人都知道如何解决这个问题?

2 个解决方案

#1


1  

Remove these extra TRs

删除这些额外的TR

 <tr>
 </tr>
 <tr>
 </tr>

#2


0  

You seem to have missed all of the closing tags, the style tags are in the body, and you have a few empty rows.

您似乎错过了所有结束标记,样式标记位于正文中,并且您有一些空行。

Also, making it a fixed width might cause some issues.

此外,使其固定宽度可能会导致一些问题。

Here it is all sorted.

这里全部排序。

<html>
<head>
    <title></title>
</head>
<body>
    <table border="0" cellpadding="0" cellspacing="0" class="grey" style="width:80%;margin:0 auto;">
        <tbody>
            <tr>
                <td valign="top"><br>
                    <table border="1" cellspacing="0">
                        <tbody>
                            <tr>
                                <td colspan="3"><img alt="" src="http://newsletters.stellenbosch-mail.com/users/assets/14/images/Header.jpg" width="100%"></td>
                            </tr>
                            <tr bgcolor="#99CC66">
                                <td colspan="3">
                                    <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif" size="4">NEWSLETTER<br>
                                        <font size="1">May 2014</font></font></div>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <div align="justify"><br>
                                        <font face="Arial, Helvetica, sans-serif" size="2">Universiteite regoor die wêreld besef al hoe meer dat daar op verskillende maniere aandag gegee moet word aan die uitdagings van ons dag. Vrae in hierdie verband word selfs meer spesifiek as daar gesoek word na die rol wat graduandi speel as leiers in ons samelewing.<br>
                                        <br>
                                        Om hierdie vrae verder te vra en om te begin om antwoorde te vind, het die Universiteit van Stellenbosch (US) besluit om die Frederik van Zyl Slabbert Instituut vir Studenteleierskapsontwikkeling (FVZS Instituut) te vestig as ’n sentrale vennoot in die leer- en leefwêreld van studente. Die FVZS Instituut – die eerste van sy soort in Suid-Afrika – is in 2011 amptelik bekendgestel en bou op verskillende maniere voort op die nalatenskap van wyle dr Frederik van Zyl Slabbert.<br>
                                        <br>
                                        Hierdie nuusbrief bied 'n samevatting van die aktiwiteite van die FVZS-Instituut en nooi ons lesers uit om deel te neem daaraan om vrae te vra oor die kwessies van die dag en om saam met ons studente antwoorde te soek oor die kwessies van die dag. Geniet die nuusbrief!<br>
                                        <br>
                                        Leslie van Rooi</font></div>
                                </td>
                            </tr>
                            <tr>
                                <td bgcolor="#99CC66" colspan="2"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif" size="3">FVZS HONORARY LECTURE 2014 </font></font><font color="#99CC66" face="Verdana, Arial, Helvetica, sans-serif" size="2">.</font></td>
                            </tr>
                            <tr>
                                <td valign="top" width="52%">
                                    <p><br>
                                        <span style="font-size:14px;"><span style="font-family:arial,helvetica,sans-serif;"><strong>Honorary Lecture informs new generation of active citizens</strong></span></span><br>
                                        <span style="font-size:12px;"><span style="font-family: arial,helvetica,sans-serif;">Message from DR LESLIE VAN ROOI, Head of the FVZS Institute for Student Leadership Development.<br>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </td>
            </tr>
        </tbody>
    </table>

#1


1  

Remove these extra TRs

删除这些额外的TR

 <tr>
 </tr>
 <tr>
 </tr>

#2


0  

You seem to have missed all of the closing tags, the style tags are in the body, and you have a few empty rows.

您似乎错过了所有结束标记,样式标记位于正文中,并且您有一些空行。

Also, making it a fixed width might cause some issues.

此外,使其固定宽度可能会导致一些问题。

Here it is all sorted.

这里全部排序。

<html>
<head>
    <title></title>
</head>
<body>
    <table border="0" cellpadding="0" cellspacing="0" class="grey" style="width:80%;margin:0 auto;">
        <tbody>
            <tr>
                <td valign="top"><br>
                    <table border="1" cellspacing="0">
                        <tbody>
                            <tr>
                                <td colspan="3"><img alt="" src="http://newsletters.stellenbosch-mail.com/users/assets/14/images/Header.jpg" width="100%"></td>
                            </tr>
                            <tr bgcolor="#99CC66">
                                <td colspan="3">
                                    <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif" size="4">NEWSLETTER<br>
                                        <font size="1">May 2014</font></font></div>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <div align="justify"><br>
                                        <font face="Arial, Helvetica, sans-serif" size="2">Universiteite regoor die wêreld besef al hoe meer dat daar op verskillende maniere aandag gegee moet word aan die uitdagings van ons dag. Vrae in hierdie verband word selfs meer spesifiek as daar gesoek word na die rol wat graduandi speel as leiers in ons samelewing.<br>
                                        <br>
                                        Om hierdie vrae verder te vra en om te begin om antwoorde te vind, het die Universiteit van Stellenbosch (US) besluit om die Frederik van Zyl Slabbert Instituut vir Studenteleierskapsontwikkeling (FVZS Instituut) te vestig as ’n sentrale vennoot in die leer- en leefwêreld van studente. Die FVZS Instituut – die eerste van sy soort in Suid-Afrika – is in 2011 amptelik bekendgestel en bou op verskillende maniere voort op die nalatenskap van wyle dr Frederik van Zyl Slabbert.<br>
                                        <br>
                                        Hierdie nuusbrief bied 'n samevatting van die aktiwiteite van die FVZS-Instituut en nooi ons lesers uit om deel te neem daaraan om vrae te vra oor die kwessies van die dag en om saam met ons studente antwoorde te soek oor die kwessies van die dag. Geniet die nuusbrief!<br>
                                        <br>
                                        Leslie van Rooi</font></div>
                                </td>
                            </tr>
                            <tr>
                                <td bgcolor="#99CC66" colspan="2"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif" size="3">FVZS HONORARY LECTURE 2014 </font></font><font color="#99CC66" face="Verdana, Arial, Helvetica, sans-serif" size="2">.</font></td>
                            </tr>
                            <tr>
                                <td valign="top" width="52%">
                                    <p><br>
                                        <span style="font-size:14px;"><span style="font-family:arial,helvetica,sans-serif;"><strong>Honorary Lecture informs new generation of active citizens</strong></span></span><br>
                                        <span style="font-size:12px;"><span style="font-family: arial,helvetica,sans-serif;">Message from DR LESLIE VAN ROOI, Head of the FVZS Institute for Student Leadership Development.<br>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </td>
            </tr>
        </tbody>
    </table>