basic table padding with html & dreamweaver

917 views Asked by At

I haven't used DW for a while, excuse my beginners question.

I have created a table with 2 rows & 1 column within HTML. I have inserted an image in to the top row and one image in to the bottom row.

With border, cell padding and cell spacing set to 0, I cannot figure out why I see pixel padding/spacing at the bottom of each cell. I have changed the background colour of the cells in the table to red so that its easy to show the padding.

Changing the vertical alignment for the cells does not change the issue.

I haven't created CSS page for this.

From what I recall in my previous experience with DW padding and spacing was quite simple when creating a basic table in HTML, so not sure where I am going wrong.

Any help would be much appreciated on where I am going wrong here.

Link to the resulting output when i preview the code in safari and/or chrome

https://dl.dropboxusercontent.com/u/13258883/DW.png

    <!doctype html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>Untitled Document</title>
    </head>

    <body>
        <table width="512" border="0" cellpadding="0" cellspacing="0" >

        <tbody>
            <tr>
              <td colspan="2" bgcolor="#F50408"><img src="images/Untitled-10_01.gif"     width="512" height="107" alt=""/></td> 
            </tr>
            <tr>
              <td colspan="2" bgcolor="#F50408"><img src="images/Untitled-10_02.gif" width="512" height="93" alt=""/></td>
            </tr>
        </tbody>
        </table>
    </body>
</html>
1

There are 1 answers

0
deeps10 On

found the answer i add the following code in to the head

       <style>

       img {
             display:block;
            }

       </style>