HTML trouble

  • 1
  • Question
  • Updated 9 years ago
  • Answered
Hi

Can anybody kindly tell me why this code does not seem to be working im not sure if its me or the code

img src="resources/Links/Link40.jpg" 

onmouseover="this.src='resources/Links/Link38.jpg'" 

onmouseout="this.src='resources/Links/Link40.jpg'"> 

I want this image

to change to this image on mouse over

The page I am working on is http://www.photoconfident.com/how-doe...
(at the bottom)

As you can see i have the code working to some extent but I can seem to get it to change to second image even though the URL of the image appears to be correct (I think)

Any help is good help

Thanks
Stewart
Photo of Stewart Scott

Stewart Scott

  • 121 Posts
  • 3 Reply Likes
  • Hopeful

Posted 9 years ago

  • 1
Photo of UK Duke

UK Duke, Champion

  • 3321 Posts
  • 213 Reply Likes
Hi Stewart,

From what i can see you have in the code a file called Link38 - which is not a reachable file - the file you added above is called Link39 which is reachable at your site- perhaps this is the problem.

Lee.
Photo of Stewart Scott

Stewart Scott

  • 121 Posts
  • 3 Reply Likes
Thanks Lee - sorted it sometimes you need another pair of eyes to see the problem.

My next quesiton is how can I make this a link? - I guess here is where its gets tricky?
Photo of UK Duke

UK Duke, Champion

  • 3321 Posts
  • 213 Reply Likes
<!--

Just wrap the whole code in a < a href

like this:

<a href="http://www.photoconfident.com">&lt;img src="http://www.photoconfident.com/resourc..." onmouseover="this.src='http://www.photoconfident.com/resourc..." onmouseout="this.src='http://www.photoconfident.com/resourc...>

This is linked to your site - let me know if you want help making it open in a new tab or any other link tricks you may require.

Lee.

-->

PS. i have included the full URL of the images for testings sake... just resources/ etc. will be fine on your site.
Photo of Stewart Scott

Stewart Scott

  • 121 Posts
  • 3 Reply Likes
Cheers Duke - but now I have a border that I need to get rid of. I have the code I think its border="0"></ but where do I need to place it. could you show me in the example above.

Much apreciated
Stewart

thanks
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
Hey Stewart

Lee might be offline at the moment. Please look the code below to see where to add the border="0"

<a href="http://www.photoconfident.com&quot;&g... src="http://www.photoconfident.com/resourc...; onmouseover="this.src='http://www.photoconfident.com/resourc...; onmouseout="this.src='http://www.photoconfident.com/resourc...; border="0"></a>
Photo of Stewart Scott

Stewart Scott

  • 121 Posts
  • 3 Reply Likes
Hi Littleus - unfortunately that does not work

www.photoconfident.com - please take note of the first link 'General' the above 'border="0"> is in that code in the same position as above.
strange !

Stewart
Photo of UK Duke

UK Duke, Champion

  • 3321 Posts
  • 213 Reply Likes
<!--

Hi Stewart -

This time of day littleus is not here - so its my turn again :)

First of all - i think they look amazing well done.

What exactly is the problem? - You dont want that white border around each of them?

From what i can see on the page code - you have ended the href (</a>) then added the border="0"

Yours reads like this

<a href="http://www.photoconfident.com/what-do...> <img src=http://www.photoconfident.com/resourc...
onmouseover="this.src='http://www.photoconfident.com/resourc..."
onmouseout="this.src='http://www.photoconfident.com/resourc...>
<border="0"></a>

Should be like this:

<a href="http://www.photoconfident.com/what-do...> <img src=http://www.photoconfident.com/resourc...
onmouseover="this.src='http://www.photoconfident.com/resourc..."
onmouseout="this.src='http://www.photoconfident.com/resourc..." border="0"></a>

-->

Lee.
Photo of Stewart Scott

Stewart Scott

  • 121 Posts
  • 3 Reply Likes
Thanks lee I will give it a try when I get home - its difficult because at home there are no borders but at work there is. it must be browsers - I use a MAC which can produce different effects than PC's. I have to check on a PC at work to see if the work I did the previous evening looks ok. Anyway I shall study your answer and try to solve it - thanks for you kind comments I am having loads of fun with it.

Stewart