Link to home
Start Free TrialLog in
Avatar of jessicafnz
jessicafnz

asked on

Get rid of the 20px border that appears at the end of my page?

Hi Everyone,

I'm doing a small mailer, and heres my code. It's really simple, but theres one problem. When I insert the mailer into outlook express, a 20px border appears at the end of the page. Its there no matter what I do. How do I get rid of this? could you please help me?

I insert like this New Message-> Insert -> Select Text from file -> select my html file

Thanks

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Message Template</title>

</head>

<body>

<table width="566" border="0" cellspacing="0" cellpadding="1" align="center">
  <tr>
    <td bgcolor="#cccccc">

<table width="100%" border="0" cellspacing="0" cellpadding="20" align="center" height="100%">
  <tr>
    <td bgcolor="#FFFFFF">

Text goes here

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


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

</body>
</html>
Avatar of jessegivy
jessegivy
Flag of United States of America image

Hi Jessica,

I think you may be using the wrong terminology when you say that there's a "20px border" at the bottom of your page.  I notice that in the following code you've got cellpadding set to 20 which might produce such an anomolie.

Try changing this:

<table width="100%" border="0" cellspacing="0" cellpadding="20" align="center" height="100%">
  <tr>
    <td bgcolor="#FFFFFF">

Text goes here

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

...to this:

<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" height="100%">
  <tr>
    <td bgcolor="#FFFFFF">

Text goes here

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

...if you desire this kind of padding but don't want it to be included at the bottom of your page, then we can discuss alternatives using CSS if you please?

Cheers,

Jesse
Avatar of jessicafnz
jessicafnz

ASKER

So you're saying put DIVs inside the table and use the padding in there?
Is it possible to mix tables and div's?
Wont there be any validation issues?
No, that's not neccesarily what I'm saying.  Ultimately. if this table is used for design purposes then it should be replaced with div's or span's and css entirely, however, there are other spacing options for use with tables and convention/standards are not always imperative to follow.

...if you could simply say what you want to do I'd be glad to help.  What is it that your design is lacking when you remove the cellpadding of 20?  It is possible to set up the desired effect using tables but I just need to know what your desired effect is?

Thanks,

Jesse
...and yes, div's may be used in conjunction with tables.  A div tag is simply a container for text and other elements, much like tables used to be.  Now tables are specified only for tabular, spreadsheet type of data display.
ASKER CERTIFIED SOLUTION
Avatar of jessegivy
jessegivy
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial