...

View Full Version : image insert into table problem



nick_a
11-09-2002, 07:51 PM
I have a cell with a fixed width that I want to insert an image into. My image is the exact same size at the cell and there is no cell spacing/padding. My problem is that when I insert the image the cell is resized and there is a space at the right of the image causing the width of the cell to be increased. This inturn messes up the rest of my cell alignments. Does anyone know why this would happen? Thanks for any help!
- Nick

Here is my code:
<body>
<div id="Layer1" style="position:absolute; left:202px; top:196px; width:491px; height:208px; z-index:1; overflow: auto;">
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</div>
<table width="698" height="625" border="1" cellpadding="0" cellspacing="0" class="main">
<tr>
<td height="55" colspan="10" valign="top" class="toplogo" cellpadding="0" cellspacing="0">&nbsp;</td> <-- This is where I want my image to go.
</tr>
<tr>
<td height="115" class="biglogo" colspan="10" valign="top">&nbsp;</td>
</tr>
<tr bordercolor="#666666" bgcolor="#CCCCCC">
<td width="80" height="21" align="center" valign="middle" bordercolor="#CCCCCC" bgcolor="#CCCCCC" class="nav"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong><a href="#" class="link_main"><em>Main</em></a></strong></font></td>
<td width="23" align="center" valign="middle" bgcolor="#CCCCCC" class="nav">&nbsp;</td>
<td width="89" align="center" valign="middle" class="nav"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong><a href="#">Profile</a></strong></font></td>
<td width="72" align="center" valign="middle" class="nav"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><a href="#">Services</a></font></strong></td>
<td width="95" align="center" valign="middle" class="nav"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><a href="#">Portfolio</a></font></strong></td>
<td width="59" align="center" valign="middle" class="nav"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><a href="#">Clients</a></font></strong></td>
<td width="91" align="center" valign="middle" class="nav"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><a href="#">Contact</a></font></strong></td>
<td width="1" align="center" valign="middle" class="nav">&nbsp;</td>
<td colspan="2" valign="top" class="nav">&nbsp;</td>
</tr>
<tr>
<td colspan="3" rowspan="2" valign="top" class="pic_cell" cellpadding="2">&nbsp;</td>
<td height="214" colspan="7" valign="top" class="news_cell">&nbsp;</td>
</tr>
<tr>
<td height="21" colspan="2" valign="top" class="topwork_cell">&nbsp;</td>
<td colspan="4" valign="top" class="topwork_cell">&nbsp;</td>
<td width="158" valign="top" class="topwork_cell">&nbsp;</td>
</tr>
<tr>
<td height="177" colspan="3" valign="top" class="cell">&nbsp;</td>
<td colspan="2" valign="top" class="work_cell">&nbsp;</td>
<td colspan="4" valign="top" class="work_cell">&nbsp;</td>
<td valign="top" class="work_cell">&nbsp;</td>
</tr>
<tr bgcolor="#CCCCCC">
<td height="22" colspan="10" valign="top" class="footer">&nbsp;</td>
</tr>
</table>

</body>

webmarkart
11-09-2002, 08:31 PM
the max number of td's that you have in any row is 9 (one having colspan=2). You cannot have a colspan in the row that has the most cells. Try taking out the colspan=2 in the row with 9 cells and make sure all td's and colspans add up to 9.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum