Insert large HTML table in Outlook mail body

Viewed 1165

I need to insert a very large html table in the body of an outlook mail, the problem is that I don't now how to avoid that the columns shrink, practically displaying the text vertically (the text breaks when the number of columns and the characters inside becomes too high, there seems to be a width limit for html tables).
Can anyone help me find a solution to make the whole row visible without wrapping or column shrinking?

For example if you try to insert this html table in the body of a mail you immediatly see that the column is shrinked.

<table border="1">
<tr>
    <td>Test_width_column</td>  <td>Test_width_column</td> 
    <td>Test_width_column</td>  <td>Test_width_column</td> 
    <td>Test_width_column</td>  <td>Test_width_column</td> 
    <td>Test_width_column</td>  <td>Test_width_column</td> 
    <td>Test_width_column</td>  <td>Test_width_column</td> 
    <td>Test_width_column</td>  <td>Test_width_column</td> 
    <td>Test_width_column</td>  <td>Test_width_column</td> 
    <td>Test_width_column</td>  <td>Test_width_column</td> 
    <td>Test_width_column</td>  <td>Test_width_column</td> 
    <td>Test_width_column</td>  <td>Test_width_column</td> 
    <td>Test_width_column</td>  <td>Test_width_column</td> 
    <td>Test_width_column</td>  <td>Test_width_column</td> 
    <td>Test_width_column</td>  <td>Test_width_column</td> 
    <td>Test_width_column</td>  <td>Test_width_column</td> 
    <td>Test_width_column</td>  <td>Test_width_column</td> 
    <td>Test_width_column</td>  <td>Test_width_column</td> 
    <td>Test_width_column</td>  <td>Test_width_column</td> 
    <td>Test_width_column</td>  <td>Test_width_column</td> 
    <td>Test_width_column</td>  <td>Test_width_column</td> 
    <td>Test_width_column</td>  <td>Test_width_column</td> 
    <td>Test_width_column</td>  <td>Test_width_column</td> 
    <td>Test_width_column</td>  <td>Test_width_column</td> 
    <td>Test_width_column</td>  <td>Test_width_column</td> 
    <td>Test_width_column</td>  <td>Test_width_column</td> 
    <td>Test_width_column</td>  <td>Test_width_column</td> 
    <td>Test_width_column</td>  <td>Test_width_column</td> 
    <td>Test_width_column</td>  <td>Test_width_column</td> 
    <td>Test_width_column</td>  <td>Test_width_column</td> 
    <td>Test_width_column</td>  <td>Test_width_column</td> 
    <td>Test_width_column</td>  <td>Test_width_column</td> 
    <td>Test_width_column</td>  <td>Test_width_column</td> 
    <td>Test_width_column</td>  <td>Test_width_column</td> 
    <td>Test_width_column</td>  <td>Test_width_column</td> 
    <td>Test_width_column</td>  <td>Test_width_column</td> 
</tr>

If someone manages to set properties or css so as not to tighten the columns of this example, let me know! Thanks for help!

2 Answers

try to add CSS like this

  .td{width: 20px;}

The problem is that the rendering engine isn't a browser control, it's actually MSWord. The only way I've found around it is to use conditional html that is only used by Outlook. I wrap my tables in an Outlook only table that has a fixed width. The tables can't resize in Outlook, but they still do in every other email client.

   <!--[if mso]>
    <table width="600">
      <tr>
        <td>
    <![endif]-->
<table> <!-- this is the regular table -->
</table>
    <!--[if mso]>
        </td>
      </tr>
    </table>
  <![endif]-->

Rendering engines that don't use MSWord will ignore the new table as just html comments, but Outlook will see those as instructions to render the the code between the if/endif tags.

Related