#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2012
    Posts
    4
    Rep Power
    0

    Table spacing issue


    i am developing an html email. to do this i used two separate tables and now there is spacing between them. i cut images to post in the tables that seems to be causing the issue. however i have tried everything i know including looking online for solutions.


    SOlutions tried :
    - setting the cellspacing to 0
    - setting the cellpadding to 0
    - setting the border to 0
    - reducing the height of the table so there should no spacing between the table edge and imagg


    any ideas
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2012
    Posts
    4
    Rep Power
    0
    <!DOCTYPE html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Untitled Document</title>
    </head>



    <body>
    <center>

    <!--top of email header-->
    <table align="center" style="width:600px; height:243x; boarder-collapse: collapse;" cellpadding="0" cellspacing="0">
    <tr valign="top">
    <td> <img src="images/header1.jpg" ></td>



    </tr>



    </table>

    <table bgcolor="#000000"height="457px" cellpadding="0" border="collapse" cellspacing="0" style="border-collapse:collapse;" >

    <tr>
    <td width="386px" valign="top">


    </td >
    <td width="214px" valign="top"><img src="images/side.jpg" > </td>



    </tr>


    </table>


    </table>


    </body>
    </html>
  4. #3
  5. JavaScript is not spelt java
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2011
    Location
    Landan, England
    Posts
    743
    Rep Power
    165
    There are numerous errors in your code, including the spelling of border, an unmatched-closing table tag, use of deprecated (obsolete in HTML5) attributes (center, valign, bgcolor).

    I suggest you fix these first. Validate!. Otherwise, you cannot expect it to behave.

    Once you've fixed everything you should study CSS and probably remove the tables' margins.
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2012
    Posts
    4
    Rep Power
    0
    Thank you for your help and for hurting my feelings JK JK.
    i corrected the errors and vailitated. thank you

    so what your saying you can use table for html 5
    i thought it was flexible? please elaberate
  8. #5
  9. JavaScript is not spelt java
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2011
    Location
    Landan, England
    Posts
    743
    Rep Power
    165
    Code:
    <style type="text/css">
    table {
        margin-top: 0;
    }
    </style>
    is a starting point, as in this page: w3schools

IMN logo majestic logo threadwatch logo seochat tools logo