Search code examples
phphtml-tablehtml-emailwindows-live-mail

Windows live mail places all tables in 1 row, instead beneath eachother


Edit: Added example below.

I have the following code (simplified for example) which I send as newsletter:

<table width="700">
    <tr>
        <td width="700"><!-- Really trying to set 700 as max) -->

            <table width="700"> <!-- simple table content, not bigger than 700 --></table>
            <table width="350"> <!-- simple table content, not bigger than 350 --></table>
            <table width="350"> <!-- simple table content, not bigger than 350 --></table>

        </td>
    </tr>
</table>

Expected result:
[------ table 700 ------]
[ table 350 ][ table 350 ]

Result in Windows Live Mail: (working fine in Mac's Mail)
[------ table 700 ------][ table 350 ][ table 350 ]

It's all in 1 row, though the wrapping TD and table are set to 700, I'm expected it starting on new lines.

I can not add breaks, this is dynamic code, I have more parts, and I dont know in the code which is the last of a line.

I can't find topics about this, other than "start sending mails, with tables"-novice solutions.

Anyone got a clue?


Solution

  • The problem/solution is using align="left". Any table with align=left will have the next table stuck to it. Example of prefered result:

    [---- 100 ----]
    [--50--][--50--]
    [25][25][25][25]

    If all those tables have align="left", it would result in one long line:

    [---- 100 ----][--50--][--50--][25][25][25][25]

    I removed the align=left from the first table, which results like this:

    [---- 100 ----]
    [--50--][--50--][25][25][25][25]

    I can'r remove the align=left from the other tables, because I want those inline-block. In order to get them properly, I added a 'split' in my code. The split-table is a table without the align=left and no height. All tables haves align=left, apart from the split:

    [---- 100 ----](split)
    [--50--][--50--](split)
    [25][25][25][25]