SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2007
    Posts
    86
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    I have a remarkably mysterious bug here.

    Hello. I hope that you are well and enjoying life in general.

    I have a bug that is intriguingly mysterious. Here is the html:

    HTML Code:
    	<div id="selector_col_2">
    	<p>
    	Here's some lovely music for you!
    	</p>
    	<br>	    
    		<a href="watching_things_ed_hines_band.mp3"><img src="red_lion_title_60p.gif" </a><br>
    		<a href="terry_sings_ed_hines_band.mp3"><img src="red_my_girlfriend_title_60p.gif" </a><br>
            <a href="lynnie_ed_hines_band.mp3"><img src="red_crush_title_60p.gif" </a><br>
            <a href="your_star_ed_hines_band.mp3"><img src="red_the_new_girl_title_60p.gif" </a><br>
    
    	<p>
    	Or maybe some videos...
    	</p>
    	<br>
    		<a href="http://www.youtube.com/watch?v=yIq3YHxkU4M"> <img src="walter_head_01.jpg" 
    		height="98px" width="110px" border="none" alt="This is the button to go to the video for Space Man">
    		</a>
    		<a href="http://www.youtube.com/watch?v=yIq3YHxkU4M"> <img src="walter_head_01.jpg" 
    		height="98px" width="110px" border="none" alt="This is the button to go to the video for Space Man">
    		</a>
    	
    	
    	</div>
    Never mind the mismatch between the song names and the song titles. This is copied from an earlier site and I haven't updated everything yet.

    But anyway, the browser displays this:

    FunnyHyperlink.jpg

    As you can see, the second paragraph shows as a link. The link, if I roll over it, appears to go to an mp3 that used to be in this folder, but isn't any more.

    How did this line of text get turned into a link to an old sound file? This happens on firefox, Chrome, and Opera. I tried the usual "oh just clean out the browser", not expecting or getting any answers. I erased everything from the previous character to the next character and replaced the text line, to no avail.

    This is pretty weird.
    Attached Images Attached Images

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,331
    Mentioned
    463 Post(s)
    Tagged
    8 Thread(s)
    Your code is broken, because none of your <img> elements are closed off. So the browser doesn't know where the links end and is getting confused.

    You could run your code through the HTML validator if you want more help finding the missing tags, but the code is not well written for other reasons. These days, you almost never need a <br> element, for example. Use CSS instead—padding, margin etc.

  3. #3
    SitePoint Enthusiast
    Join Date
    Jan 2007
    Posts
    86
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    Your code is broken, because none of your <img> elements are closed off. So the browser doesn't know where the links end and is getting confused.
    .
    I'm sorry, I guess I don't know what you mean..

  4. #4
    SitePoint Enthusiast
    Join Date
    Jan 2007
    Posts
    86
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Mr pseudonym View Post
    I'm sorry, I guess I don't know what you mean..
    OH, oh, I see. Got it. Just another case of looking and looking and not seeing.

    Thank you.

  5. #5
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,331
    Mentioned
    463 Post(s)
    Tagged
    8 Thread(s)
    No probs. I guess I should have given an example:

    Code:
    <img src="red_crush_title_60p.gif">


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •