jay321 — 2011-10-19T18:29:46-04:00 — #1
I’m hoping someone can help me please, I’m new to web developing and I’m trying to insert an image into a HTML document but all I keep getting is a blank shape of the image with a red X in the corner and the alt name. The code I'm using is:
<link rel="stylesheet" type="text/css" href="kh.css" />
<img src="http:// images/banner.gif" width="157" height="70" alt="KH logo" />
I’m using notepad++ as my text editor and WAMP server 2.2 on Win7. The image file is located within the WAMP www directory, as are my notepad PHP and CSS files.
And the strange thing is if I use the below PHP code instead within the body it pulls it up straight away.
print ("<IMG SRC =images/banner.GIF>");
If anyone could help I’d really appreciate it?
kohoutek — 2011-10-19T18:58:19-04:00 — #2
You've got a space in the src attribute and a wrong url path which is why the image won't show up.
It should be:
<img src="images/banner.gif" alt="" width="" height="">
jay321 — 2011-10-20T02:42:11-04:00 — #3
Kohoutek, thank you so much, I have spent hours trying to figure that out :0(. And yet now when I think about it it makes so much sense.
I know I've got a long way to go and thanks again for your kind advice.
daniel_moore — 2011-10-28T07:34:43-04:00 — #4
It is always the simplest thing, I'm like that sometimes