d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Need Help With Html Email Template
Add Reply New Topic New Poll
Member
Posts: 61,688
Joined: Mar 14 2006
Gold: 28.77
Aug 17 2012 08:19am
Hi folks,

I have a pretty simple html email template I am using to do large email blasts (100k+ people), and it looks correct on most displays, but we have gotten a very small number of complaints about text being cropped off or the email not displaying correctly. I think the problem may be with Outlook (I'm not sure if everyone who is having issues viewing it using Outlook, but a few of them have said they are).

Can someone take a look at the template and tell me if you see anything obvious that would be causing issues with the email display?

I can pay you some fgs too ;)
Member
Posts: 789
Joined: Jan 21 2006
Gold: 22.00
Aug 17 2012 01:58pm
Widths should be % based not pixel based
Member
Posts: 61,688
Joined: Mar 14 2006
Gold: 28.77
Aug 17 2012 02:15pm
Quote (koa_wolf @ Aug 17 2012 03:58pm)
Widths should be % based not pixel based


Eh? If I want a nice 600px centered text box to display, I can't do that with % can I?
Member
Posts: 13,630
Joined: Dec 4 2009
Gold: 0.00
Aug 17 2012 02:34pm
Quote (koa_wolf @ Aug 17 2012 12:58pm)
Widths should be % based not pixel based


/facepalm

that depends entirely on what you're trying to accomplish.
Member
Posts: 789
Joined: Jan 21 2006
Gold: 22.00
Aug 17 2012 04:54pm
Quote (inkanddagger @ Aug 17 2012 12:15pm)
Eh? If I want a nice 600px centered text box to display, I can't do that with % can I?


600px on a 800x600 resolution is 75% of their screen. If you say the average screen is 1280x800 it's close to 50% of the screen, why not just have 40% as the width therefore different resolutions will have about the same look

Member
Posts: 789
Joined: Jan 21 2006
Gold: 22.00
Aug 17 2012 04:56pm
Quote (BreakPoint @ Aug 17 2012 12:34pm)
/facepalm

that depends entirely on what you're trying to accomplish.


Sure, but if people have text cut off it's obvious that they have a different resolution and therefore text looks different because everything was coded based of pixels and probably not tested on every resolution
Member
Posts: 61,688
Joined: Mar 14 2006
Gold: 28.77
Aug 18 2012 11:27am
Uhm, is it possible to do that and have a centered text box on the page?


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0" style="background-color: #ffffff;">
<center>
<table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" style="background-color: #ffffff;">
<tr>
<td align="center" valign="top">
<table border="0" cellpadding="0" cellspacing="0" width="600" style="background-color: #fffff; padding: 10px 10px 0 10px;">
<tr>
<td valign="top">
<table border="0" cellpadding="-200" cellspacing="0" width="600" style="background-color: #ffffff; border: 1px solid #dddddd;">
<tr>
<td align="center" valign="top">
<!-- Begin Template Header -->
<table border="0" cellpadding="4" cellspacing="0" width="600" style="background-color: #ffffff;">
<tr>
<td width="600">
<a href="http://xxxxxxxx"><img src="transparentlogo.png" width="190" height="106"/></a>
</td>
<td>
<a style="color: #00456f; font-size: 8px; font-weight: bold; font-family: Helvetica, Arial, sans-serif; text-decoration: none; text-shadow: #9CC5C9 0px 0px;" href="xxxxxxx"></a>
</td>
</tr>
</table>
Member
Posts: 789
Joined: Jan 21 2006
Gold: 22.00
Aug 18 2012 12:53pm
Quote (inkanddagger @ Aug 18 2012 09:27am)
Uhm, is it possible to do that and have a centered text box on the page?


<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  </head>
  <body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0" style="background-color: #ffffff;">
    <center>
      <table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" style="background-color: #ffffff;">
        <tr>
          <td align="center" valign="top">
            <table border="0" cellpadding="0" cellspacing="0" width="600" style="background-color: #fffff; padding: 10px 10px 0 10px;">
              <tr>
                <td valign="top">
                  <table border="0" cellpadding="-200" cellspacing="0" width="600" style="background-color: #ffffff; border: 1px solid #dddddd;">
                    <tr>
                      <td align="center" valign="top">
                        <!-- Begin Template Header  -->
                        <table border="0" cellpadding="4" cellspacing="0" width="600" style="background-color: #ffffff;">
                          <tr>
                            <td width="600">             
                              <a href="http://xxxxxxxx"><img src="transparentlogo.png"  width="190" height="106"/></a>
                            </td>                         
                            <td>
                              <a style="color: #00456f; font-size: 8px; font-weight: bold; font-family: Helvetica, Arial, sans-serif; text-decoration: none; text-shadow: #9CC5C9 0px 0px;" href="xxxxxxx"></a>
                            </td>
                          </tr>
                        </table>



If you want your table to be a certain percentage width, you can do this in CSS:

table#table1 {
width:70%;
margin-left:15%;
margin-right:15%;
}
And then in your HTML/XHTML, you would do this:

<table id="table1">
...
</table>

Go Back To Programming & Development Topic List
Add Reply New Topic New Poll