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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table difficulty 1

Status
Not open for further replies.

piratefan

Programmer
Jul 20, 2003
195
US
I am having a heck of a time. I haven't been doing this too long. I am trying to get an image to fit into a table cell so that the background of the cell doesn't show. Now the image is only 60 high. Even if I make the height = "50", there is still a line showing at the bottom of the image running horizontally. I am enclosing just a simple test page that I can't get to work right. Maybe somebody can tell me what I am doing wrong.
Thanks.
Code:
<html>
<head>
</head>
<body bgcolor=&quot;blue&quot;>
    <table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; width=&quot;100%&quot; bgcolor=&quot;silver&quot;>
        <tbody>
            <tr>
                <td bgcolor=&quot;white&quot; height=&quot;60px&quot;>
                    <asp:Image id=&quot;Image1&quot; border=&quot;0&quot; runat=&quot;server&quot; ImageUrl=&quot;vic.gif&quot;></asp:Image> 
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Image id=&quot;Image2&quot; border=&quot;0&quot; runat=&quot;server&quot; ImageUrl=&quot;vic.gif&quot;></asp:Image> 
                </td>
            </tr>
        </tbody>
    </table>
    
</body>
</html>
 

That can be caused by extra whitespace in your code. Not saying it *is* in this case mind, just that it *can*.

Try it and see.
 
Thanks for the help. The test code above. I have a tool called Web Matrix. When I view this page with it, it is fine. No space under the gifs. But when I put it to the server and look at it with IE, the spaces under each gif are there. Any ideas what I can do?
Thanks.
 
Instead of <td>
code
</td>

The following worked :
<td>code>/td>

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top