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

images stretching tables! Help needed

Status
Not open for further replies.

stewartalan

Programmer
Oct 14, 2002
3
0
0
GB
I have a table that is 85% wide and an embedded table formatted center and holding an image within it. If the image is 300 pixels wide there is no problem, but if the image is any wider than that it begins to stretch the main table out dramatically, despite it being considerably wider than the embedded content. Can anyone tell me why this is and what I can do to prevent it.

Many thanks

Stewart
 
please post up the code so we can get a better idea of what is happening Miles

Those Micros~1 guys sure know what they doing!
 
Ok, well firstly have a look at the URL and you'll see what I mean. The images that are encased in the white border are just center formatted yet the second one has forced the table. Its an asp page, but the HTML being returned for the table being stretched is below. I've highlighted with ***********s the offending table.


<table width=&quot;85%&quot; align=&quot;center&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr>
<td colspan=&quot;2&quot; align=&quot;left&quot; valign=&quot;bottom&quot; height=&quot;2&quot; background=&quot;../images/top_stretch.gif&quot;><img src=&quot;../images/distribution_stretch.jpg&quot; width=&quot;499&quot; height=&quot;18&quot;></td>
<td align=&quot;left&quot; valign=&quot;bottom&quot; height=&quot;2&quot; width=&quot;100%&quot; background=&quot;../images/top_stretch.gif&quot;><img src=&quot;../images/top_stretch.gif&quot; width=&quot;1&quot; height=&quot;18&quot;></td>
<td align=&quot;left&quot; valign=&quot;bottom&quot; width=&quot;21&quot; height=&quot;2&quot;><img src=&quot;../images/top_right.gif&quot; width=&quot;15&quot; height=&quot;18&quot;></td>
<td align=&quot;left&quot; valign=&quot;top&quot; rowspan=&quot;4&quot; height=&quot;8&quot; width=&quot;12&quot;><img src=&quot;../images/transparent_gif.gif&quot; width=&quot;10&quot; height=&quot;1&quot;></td>
</tr>
<tr>
<td rowspan=&quot;2&quot; align=&quot;left&quot; valign=&quot;top&quot; width=&quot;7&quot; height=&quot;83&quot; background=&quot;../images/left_stretch.gif&quot;><img src=&quot;../images/left.gif&quot; width=&quot;7&quot; height=&quot;83&quot;></td>
<td colspan=&quot;2&quot; align=&quot;left&quot; valign=&quot;top&quot; height=&quot;5&quot; bgcolor=&quot;#330099&quot;><img src=&quot;../images/transparent_gif.gif&quot; width=&quot;1&quot; height=&quot;5&quot;></td>
<td align=&quot;left&quot; valign=&quot;top&quot; rowspan=&quot;2&quot; height=&quot;7&quot; width=&quot;15&quot; background=&quot;../images/right_stretch.gif&quot;><img src=&quot;../images/right.gif&quot; width=&quot;15&quot; height=&quot;83&quot;></td>
</tr>
<tr>
<td colspan=&quot;2&quot; align=&quot;left&quot; valign=&quot;top&quot; bgcolor=&quot;#330099&quot; class=&quot;textsize&quot;>
*******************************************************
<div align='center'><table border='3' cellspacing='0' cellpadding='5' bordercolor='#000000'><tr><td bgcolor='#FFFFFF'><table width='100%' border='3' cellspacing='0' cellpadding='0' bordercolor='#000000'><tr><td><a href='label_detail.asp?lblid=50'><img src='../images/label_logos/20.gif' border='0'></a></td></tr></table></td></tr></table></div>
********************************************************
<table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;5&quot; cellpadding=&quot;0&quot;>
<tr align=&quot;left&quot; valign=&quot;top&quot;>
<td width=&quot;100&quot; class=&quot;textsizetitle&quot;><font color=&quot;#000000&quot;>Label:</font></td>
<td width=&quot;15&quot;>&nbsp;</td>
<td><font face=&quot;Arial, Helvetica, sans-serif&quot; size=&quot;3&quot; color=&quot;#FFFFFF&quot;><a href=&quot;label_detail.asp?lblid=50&quot;>test</a></font></td>
</tr>
<tr align=&quot;left&quot; valign=&quot;top&quot;>
<td width=&quot;100&quot; class=&quot;textsizetitle&quot;><font color=&quot;#000000&quot;>Music Style:</font></td>
<td width=&quot;15&quot;>&nbsp;</td>
<td><font face=&quot;Arial, Helvetica, sans-serif&quot; size=&quot;3&quot; color=&quot;#FFFFFF&quot;>ter
</font></td>
</tr>
<tr align=&quot;left&quot; valign=&quot;top&quot;>
<td width=&quot;100&quot; class=&quot;textsizetitle&quot;><font color=&quot;#000000&quot;>Description:</font></td>
<td width=&quot;15&quot;>&nbsp;</td>
<td><font face=&quot;Arial, Helvetica, sans-serif&quot; size=&quot;3&quot; color=&quot;#FFFFFF&quot;>ererwtw<br>
</font></td>
</tr>
<tr align=&quot;left&quot; valign=&quot;top&quot;>
<td width=&quot;100&quot; class=&quot;textsizetitle&quot;><font color=&quot;#000000&quot;>URL:</font></td>
<td width=&quot;15&quot;>&nbsp;</td>
<td>

<font face=&quot;Arial, Helvetica, sans-serif&quot; size=&quot;3&quot; color=&quot;#FFFFFF&quot;><a href=&quot;http://
&quot; target=&quot;_blank&quot;>http://
</a></font>

</td></tr>
<tr align=&quot;left&quot; valign=&quot;top&quot;>
<td width=&quot;100&quot; class=&quot;textsizetitle&quot; height=&quot;10&quot;>&nbsp;</td>
<td width=&quot;15&quot; height=&quot;10&quot;>&nbsp;</td>
<td height=&quot;10&quot;>&nbsp;</td>
</tr>
</table>

</td>
</tr>
<tr>
<td width=&quot;7&quot; align=&quot;left&quot; valign=&quot;top&quot; height=&quot;2&quot;><img src=&quot;../images/left_bottom.gif&quot; width=&quot;7&quot; height=&quot;14&quot;></td>
<td align=&quot;left&quot; valign=&quot;top&quot; height=&quot;14&quot; width=&quot;492&quot;><img src=&quot;../images/bottom_stretch.gif&quot; width=&quot;492&quot; height=&quot;14&quot;></td>
<td align=&quot;left&quot; valign=&quot;top&quot; width=&quot;100%&quot; height=&quot;14&quot; bgcolor=&quot;#330066&quot;><img src=&quot;../images/bottom_stretch.gif&quot; height=&quot;14&quot; width=&quot;100%&quot;></td>
<td align=&quot;left&quot; valign=&quot;top&quot; width=&quot;21&quot; height=&quot;14&quot;><img src=&quot;../images/right_bottom.gif&quot; width=&quot;15&quot; height=&quot;14&quot;></td>
</tr>
<tr>
<td colspan=&quot;5&quot; align=&quot;left&quot; valign=&quot;top&quot; height=&quot;15&quot;><img src=&quot;../images/transparent_gif.gif&quot; width=&quot;1&quot; height=&quot;15&quot;></td>
</tr>
</table>
 
Add:
width=&quot;100%&quot;
to the image in that table.

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top