SverkerSbrg
SverkerSbrg

Reputation: 503

HTML email in outlook: Wrap text

I'm trying to create a html template for email and I've encountered several problems (outlook does not handle image resizing etc.). One problem which i'm so far unable to solve is text wrapping within element (table or div) with fixed width.

Here is a simple example:

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
    <table width="300px">
        <tr>
            <td width="300px"">
                Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas sed turpis nunc. Nulla nec sapien ut ligula sollicitudin vestibulum eleifend a augue. Integer felis nulla, venenatis non consectetur nec, vulputate at enim. Suspendisse potenti. Curabitur sed magna metus. Nullam ut lectus ac arcu malesuada convallis. Ut dictum facilisis augue et semper. Phasellus euismod maximus turpis, at finibus dolor placerat ut. Vestibulum ultrices imperdiet enim, ac pharetra nunc fermentum non.
            </td>
        </tr>
    </table>
</body>
</html>

It renders to a neat little box in browsers and most email clients but outlook ignores the width entirely. Help would be much appreciated.

Upvotes: 3

Views: 10412

Answers (2)

zazzyzeph
zazzyzeph

Reputation: 1795

Wrapping does work, just take the px off of your width attributes. Outlook's really picky.

Upvotes: 7

davidcondrey
davidcondrey

Reputation: 35953

You have to set your line breaks explicitly with br tags for Outlook. It sucks but it is the only reliable solution.

Upvotes: 2

Related Questions