Hi
I'm trying to generate an email with a specific format using HTML. It handles the data correctly, but it makes jumps that theoretically shouldn't and modifies the margins. When I export the HTML code to a file and open it in major browsers, it displays perfectly.
The other times I've tried using formats like this, this always happens.
Thanks
Ricardo
This is the code I'm using.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Notificación de Cheques</title>
</head>
<body style="margin:0; padding:0; font-family: Arial, sans-serif; font-size: 13px; color: #000;">
<table align="center" cellpadding="0" cellspacing="0" border="0" width="600" style="border-collapse: collapse;">
<tr>
<td style="padding: 10px;">
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="border-collapse: collapse;">
<tr>
<td style="color: red; font-weight: bold; font-size: 16px;">
XXXXXXXXXXX - TIENES %(Cantidad de cks) <span style="background: yellow;">CHEQUES</span> DISPONIBLES
</td>
</tr>
</table>
<table cellpadding="4" cellspacing="0" border="0" width="100%" style="margin-top: 10px; border-collapse: collapse;">
<tr>
<td style="background: red; color: white; font-weight: bold;">Código</td>
<td>%(DG_Codigo_cliente)</td>
<td style="background: red; color: white; font-weight: bold;">Proveedor</td>
<td>%(DG_nombre_proveedor)</td>
</tr>
<tr>
<td style="background: red; color: white; font-weight: bold;">No. Cheque</td>
<td>%(DG_No_ck)</td>
<td style="background: red; color: white; font-weight: bold;">Fecha</td>
<td>%(DG_Fecha_CK)</td>
</tr>
</table>
<table cellpadding="4" cellspacing="0" border="1" width="100%" style="margin-top: 15px; border-collapse: collapse; text-align: left;">
<thead>
<tr style="background: red; color: white; font-weight: bold;">
<th>FACTURA</th>
<th>NCF</th>
<th>FECHA</th>
<th style="text-align: right;">MONTO ORIGINAL</th>
<th style="text-align: right;">MONTO PAGADO</th>
<th style="text-align: right;">DESCTO APLICADO</th>
<th style="text-align: right;">MONTO N/C</th>
<th>NCF N/C</th>
</tr>
</thead>
<tbody>
{{#each detalles}}
<tr>
<td>%(DT_No_Fact)</td>
<td>%(DT_NCF)</td>
<td>%(DT_fecha_factura)</td>
<td style="text-align: right;">%(DT_monto_original)</td>
<td style="text-align: right;">%(DT_monto_pagado_en CK)</td>
<td style="text-align: right;">%(DT_descuento_aplicado)</td>
<td style="text-align: right;">%(DT_monto_NC)</td>
<td>%(DT_NCF_NC)</td>
</tr>
{{/each}}
</tbody>
<tfoot>
<tr style="font-weight: bold;">
<td colspan="3" style="background: red; color: white;">TOTAL</td>
<td style="text-align: right;">%(TT_total_montos_originales)</td>
<td style="text-align: right;">%(TT_Total_pagado)</td>
<td style="text-align: right;">%(TT_Total_descuentos)</td>
<td colspan="2"></td>
</tr>
</tfoot>
</table>
</td>
</tr>
</table>
</body>
</html>