Click to See Complete Forum and Search --> : Link to webpage
billmac121
01-30-2003, 04:44 PM
Hi Gang, I have a simple question" hopefully", im trying to link a gif file to a webpage. I took a code from HTMLgoodies, but it doesnt seem to work, any help would be great.
Thanks, Bill
heres what I used
<A HREF="www.yoursite.com/yourpage.html">
<IMG SRC="banner.gif" BORDER="0" WIDTH="468" HEIGHT="60" ALT="Come to my page!">
</A>
billmac121
01-31-2003, 05:44 AM
Thank You Dave, Im going to keep trying.
Bill
jpmoriarty
01-31-2003, 06:12 AM
Dave has given the right answer (as far as i can see) - but it takes a little while to notice that the two bits of code (yours and his) are actually slightly different.
You'll notice bill that dave's <a> markup has the code "http://" before the web site address - if you dont put this in then your browser will assume that it's a local address you're tring to get to (so if you were on this site, it would try to link you to http://forums.webdeveloper.com/www.yoursite.com/yourpage.html). By putting in the "http://", you're effectively telling the browser to "start from fresh" with regard to the link.
That's about the best way I could come up with for explaining it, but think that if you make that change your link will work. (you'll also be able to notice it by looking at the status bar (the grey bar at the bottom of IE, above the task bar) and seeing what that display's when you hover over the link - try it before you make the change i suggesed above and after to see it in action). if it doesnt help though, then if you post a link to your site then we'll be able to have a look at exactly what the problem is. Hope that helps.
billmac121
01-31-2003, 02:07 PM
Hey John and Dave,
<a href="http://www.webpage.com"><img src="banner.gif" alt="home page"></a>
and
<A HREF="http://www.webpage.com">
<IMG SRC="banner.gif" BORDER="0" WIDTH="468" HEIGHT="60" ALT="Come to my page!">
</A>
the first one works, but the second one sends me to my site, but the wrong page? Is it the capital letters?
Thanks for all your help, Bill
numba_one
01-31-2003, 02:57 PM
they it shouldnt send you to your site but the wrong page. that wouldnt happen unless you have the link wrong. IT WOULD ONLY HAPPEN if you are using frames. and of course frames uses only one link on the overall site (it dosnt change) due to the fact that it is operating two pages in one. thats the ONLY reason why it would send you the the home page probably.
billmac121
01-31-2003, 03:25 PM
Thanks One, I dont know what frames means, but the funny thing is it sends me to a different page, but the link is correct?
Bill
spufi
01-31-2003, 03:46 PM
Could you post a link to your site?
billmac121
01-31-2003, 03:54 PM
Spufi, heres a link and the html I created is attached, it isnt hosted anywhere so it probably wont show up, but if you notice the link goes to the wrong page?
http://www.wmacdonald.malibunow.com/index.asp?cat=carblo
It wont allow the html, heres the gif
Bill