Link to home
Start Free TrialLog in
Avatar of Shiva_Kumar
Shiva_Kumar

asked on

image not showing up on table

Hi,

here's my code:

<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center" BACKGROUND="http://abc.com/abc/images/misc/image2.jpg" repeat >
<tr>
<td align="left"><img src="http://abc.com/abc/images/misc/image1.jpg"  /></a>
</td>
<td>
<img scr="http://abc.com/abc/images/misc/logo.gif" />
</td>
</tr>
</table>

Now the logo.gif doesn't show up.  I can see that the image is attached but it is not visible.  Could u please help me understand why its doing so and what am i doing here.  its the code for the banner of my home page.
Avatar of aherps
aherps
Flag of Australia image

lose the </a> tag
Avatar of hielo
note: the path to those images do not exist. They give you a 404 error. The syntax is:
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center" style="background: transparent url(http://abc.com/abc/images/misc/image2.jpg) scroll repeat top left" >
<tr>
<td align="left"><img src="http://abc.com/abc/images/misc/image1.jpg"  />
</td>
<td>
<img scr="http://abc.com/abc/images/misc/logo.gif" />
</td>
</tr>
</table>

Open in new window

Avatar of Shiva_Kumar
Shiva_Kumar

ASKER

ok let me make it very simple.  Here's the code again:

<table>
<tr>
<td>This is a test</td>
<td><img scr="c:\logo.jpg" />
</td>
</tr>
</table>

even this doesn't show up the logo.jpg and it shows a red x instead of the image.
You need to put the image within your web server space and provide the correct path. Let's say your website's homepage is at:
http://www.yoursite.com/index.html

AND le'ts also assume that your image is at:
http://www.yoursite.com/images/image1.gif

then what you need is:

<table>
<tr>
<td>This is a test</td>
<td><img scr="/images/image1.gif" />
</td>
</tr>
</table>
 
notice that the path starts with a leading slash. Basically, to get the correct path, you need to figure out what is the full path to your image:
http://www.yoursite.com/images/image1.gif
 
then remove the domain => http://www.yoursite.com
from that full path, leaving you with:
/images/image1.gif
 
and that is the path to your image. You can of course, just leave the full path if you want:
http://www.yoursite.com/images/image1.gif

Open in new window

It should read
<table>
<tr>
<td>This is a test</td>
<td><img src="c:\logo.jpg" />
</td>
</tr>
</table>

img src - nor scr

Same problem in earlier code
If you are opening the file locally, then change:
<img scr="c:\logo.jpg" />
 
to:
<img scr="file:///c:\logo.jpg" />

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of hielo
hielo
Flag of Wallis and Futuna image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks
you are welcome