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

HTML table cell sizing problem

Status
Not open for further replies.

clickster

MIS
Feb 19, 2002
89
US
I have a table (i will place the HTML below) that is working great except for one problem. When I insert "knowledge.gif" in the last cell, it resizes that cell by adding a ton of vertical white space above and below the image. It should be trying to even out the size of teh cells in the other rows, but it's not. The 3 rows with hyperlinks in them are one height, and the bottom row with the "knowledge.gif" in it is a completely different height. If I "valign" the image to the top or the bottom, it will align properly, but all of the white space simply moves above or below the image. I have tried setting the cellspacing and cellpadding to 0 (even though it is not actually padding since there is not space to the left or right of the image. One more note is that, if I remove the "powerlines.jpg" image, the cells become evenly spaced and the bottom row conforms to the image's height like it's supposed to. I just can't figure out why this is. Any help you can offer would be greatly appreciated. Thank you.

Here is the HTML:

<html>
<head>
<title>Untitled</title>
</head>

<body>
<table border=1>
<tr>
<td rowspan=2><img src=&quot;pics\aeilogo200x200.gif&quot; width=150 height=150 border=2></td>
<td><img src=&quot;pics\intranet-banner.jpg&quot; width=600 height=150 border=2></td>
</tr>
</table>

<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td nowrap width=225><a href=&quot;news.html&quot;>Company News</a></td>
<td nowrap width=225><a href=&quot;training.html&quot;>Training Material</a> </td>
<td rowspan=4><img src=&quot;pics\powerlines.jpg&quot; height=375 width=275</td>
</tr>
<tr>
<td nowrap><a href=&quot;projects.html&quot;>Project Updates</a></td>
<td nowrap><a href=&quot;misc.html&quot;>Miscellaneous</a></td>
</tr>
<tr>
<td nowrap><a href=&quot;departments.html&quot;>Departmental Info</a></td>
<td nowrap><a href=&quot;contacts.html&quot;>Employee Phone List</a></td>
</tr>
<tr cellpadding=0 cellspacing=0>
<td colspan=2 valign=bottom><img src=&quot;pics/knowledge.gif&quot; height=75 width=487></td>
</tr>
</table>
</body>
</html>
 
put <TR HEIGHT=100> for each of the three rows above your knowledge.gif picture - does this do what you are after??

This will space them out so the four rows (3 text and 1 image) are the same height as the powerlines image on the right Tony
reddot.gif WIDTH=500 HEIGHT=2 VSPACE=3

 
Thank you very much. That fixed the problem. I had messed around with setting row heights, but had done things like setting each of the 4 rows to 25% (which expanded them all to the same large size as the bottom cell. Once I set them using 1/4th the size of the powerline image, they were perfect. Thanks again :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top