Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 216
  • Last Modified:

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.
0
Shiva_Kumar
Asked:
Shiva_Kumar
  • 5
  • 2
  • 2
1 Solution
 
aherpsCommented:
lose the </a> tag
0
 
hieloCommented:
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

0
 
Shiva_KumarAuthor Commented:
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.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
hieloCommented:
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

0
 
aherpsCommented:
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
0
 
hieloCommented:
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

0
 
hieloCommented:
Wait, the attribute is NOT "scr". The attribut is "src"

The "r" and the "c" are reversed!!!
0
 
Shiva_KumarAuthor Commented:
Thanks
0
 
hieloCommented:
you are welcome
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 5
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now