E-mail Marketing and colspan

0

I'm studying HTML to use in email marketing and I was looking at this email here: Iunderstoodthebeginningofthecode,butIdidnotunderstandthecolspanapplication:

<tr><td><ahref="https://www.facebook.com/FGV-Energia-1579891958938780/?fref=ts" target="_blank"><img src="http://www.fgv.br/mailing/2017/fgv_energia/boletim/marco/imagens/dez_01_01.jpg"width="96" height="52" alt="" style="display:block" border="0"></a>

    </td>

    <td>

    <a href="https://www.linkedin.com/company/10274929?trk=tyah&trkInfo=clickedVertical%3Ashowcase,clickedEntityId%3A10274929,idx%3A2-1-2,tarId%3A1459366866829,tas%3Afgv energia "><img src="http://www.fgv.br/mailing/2017/fgv_energia/boletim/marco/imagens/dez_01_02.jpg"width="58" height="52" alt="" style="display:block" border="0"></a>

    </td>

    <td>

    <a href="http://www.fgv.br/energia" target="_blank"><img src="http://www.fgv.br/mailing/2017/fgv_energia/boletim/marco/imagens/dez_01_03.jpg"width="446" height="52" alt="" style="display:block" border="0"></a>

    </td>

</tr>

<tr>
    <td colspan="4">

        <img src="http://www.fgv.br/mailing/FGV_Energia/boletim/2017/jun/01.png"alt="Header: Boletim de Conjuntura do Setor Energ&eacute;tico- Junho 2017" width="599" height="421" border="0" style="display:block"></td>
</tr>

And if I take out the colspan, the top of the layout moves to the left.

    
asked by anonymous 01.08.2017 / 23:07

2 answers

0

The table has 2 rows with 3 columns in the first and 1 column in the second.

For the second line to fit the first line, you use colspan to compensate.

If you omit colspan in the second line, the column of this line will be in the width of the first column of the first line.

Run the code below:

<table>
<tr>

    <td bgcolor="red">

    linha 1 - coluna 1

    </td>

    <td bgcolor="blue">

    linha 1 - coluna 2

    </td>

    <td bgcolor="yellow">

    linha 1 - coluna 3

    </td>

</tr>

<tr>
    <td bgcolor="green">
    linha 2 - coluna 1
        </td>
</tr>
</table>
    
03.08.2017 / 02:02
0

The colspan serves to inform how many columns that line will occupy, because in the situation you sent above, notice that the first line (TR) has 4 columns (TD), the second has only 1 column, without informing it I used the space of 4 columns, the image would be crooked trying to occupy only the space of the button facebook, inside a table, all the lines need to have the same number of columns and each one would follow the same width of its correspondent.     

02.08.2017 / 19:47