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!

Fit image to table

Status
Not open for further replies.

adamsoderqvist

Programmer
Sep 8, 2001
136
SE
Hi,

How do I fit an image to a table cell?

Let's say I have a simple table like this:

<table>
<tr>

<td>
<img src=&quot;MyPic.jpg&quot;>
</td>

<td>
some text
</td>

</tr>
</table>

- How do I get &quot;MyPic.jpg&quot; to be fitted into, and to fill, the whole table cell?

many thanx,

/Adam
 
<img src=&quot;..&quot; height=&quot;100%&quot; width=&quot;100%&quot;>
 
Thanx! But: it only worked in IE, but not in netscape, what to do?
 
I just tried it in IE6 & NN4.7 & NN7 and it worked fine. Are you specifying the width and height of the cell? Hope I helped / Thanks for helping
if ((Math.abs(x)<10&&Math.abs(y)<10) &&(((parseIntx.toString()+y.toString())-x-y)%9)!=0)){alert(&quot;I'm a monkey's uncle&quot;);}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top