Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outlook Ignoring HTML Email Width 1

Status
Not open for further replies.

BoulderBum

Programmer
Jul 11, 2002
2,179
US
So I'm trying to use a table layout (ordinarily bad, but said to be a necissity when emailing HTML-formatted emails), and everything looks fine in Hotmail online, but Outlook is ignoring my fixed width and allowing text to stretch to 100% of the width of the email:

Code:
<html>
    <body style="text-align: center;">
        <table border="0" cellpadding="0" cellspacing="0" width="600px" style="margin: 0 auto;">
            <tr valign="top" align="left">
                <td>[b]This test stretches 100%.[/b]</td>
            </tr>
         </table>
     </body>
</html>

Does anyone know how to properly constrain the width so Outlook doesn't mess things up?

MCP, MCTS - .NET Framework 2.0 Web Applications
 
In the TABLE tag the width attribute does not use the "px" unit definition because all values are assumed pixel values. Remove that and see if Outlook likes it better.

Einstein47
“Evil abounds when good men do nothing.“ - Nelson R.
[&#91;]Starbase47.com]
 
Good eye! That was it!

I usually rely on styles, so this issue caught me off guard. :)

MCP, MCTS - .NET Framework 2.0 Web Applications
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top