Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 10 of 10
  1. #1
    Regular Coder
    Join Date
    Jun 2003
    Location
    California
    Posts
    231
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Angry Image link not working! UGH

    [code] <A HREF="http://www.google.com"><IMG SRC="jeff1.jpg" BORDER=0 HEIGHT=120 WIDTH=500"/> </A> [icode]

    I tried to copy code from other sites like w3schools and others, and just change the values, but its not working!. I NEVER in my life had such a problem with this, and im at wits end.

    Any help is mostly appretiated. Thanks

    ps both the html file and jeff1.jpg are on my desktop. I made sure they were typed in right also.

  • #2
    New Coder
    Join Date
    Jun 2010
    Location
    Regina, Saskatchewan, Canada
    Posts
    28
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Try using this code
    Code:
    <a href="http://www.google.com/"><img src="jeff1.jpg" alt="" height="120" width="500" border="0"></a>
    Also if it doesn't work, put the image in the folder that your HTML Page is in, that could be the main problem.

  • #3
    Regular Coder
    Join Date
    Jun 2003
    Location
    California
    Posts
    231
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks Philly. Been a while sense I used html.

  • #4
    Regular Coder
    Join Date
    Jun 2003
    Location
    California
    Posts
    231
    Thanks
    0
    Thanked 0 Times in 0 Posts
    No that code isnt working and I put all the files in the same folder.

  • #5
    New Coder
    Join Date
    Jun 2010
    Location
    Regina, Saskatchewan, Canada
    Posts
    28
    Thanks
    3
    Thanked 0 Times in 0 Posts
    That's odd, it works for me when I put it in something, could I see some of the rest of the code in between where your trying to add it to?

  • #6
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    You sure the html file is on your desktop and are you sure that it is .jpg and not .JPG? Are you sure that it is even a jpeg image. Right click the file and open it firefox or internet explorer.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #7
    New to the CF scene
    Join Date
    Jun 2010
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You are probably using the wrong extension for your image. I come across the same thing a lot. Try capitalizing it (jeff1.JPG instead of jeff1.jpg) and if that doesn't work, double-check what the extention is by looking at the file properties, or like Aerospace said, opening it in a browser. The adress bar will show you the proper extension.

    If all else fails, delete the img code and type it all over. I know that sounds pointless, but it's happened to me before that I was 100% certain my img tag was flawless, but no matter what I did I couldn't make the image show up, until I simply deleted it and wrote it out anew.
    Last edited by A.T.; 06-21-2010 at 05:03 PM.

  • #8
    Regular Coder
    Join Date
    Aug 2005
    Location
    MS
    Posts
    850
    Thanks
    11
    Thanked 79 Times in 77 Posts
    The link itself should work regardless of whether the image loads or not, but you really need to include the alt="" text description so you'll have a text link at least. Also, if you are using XHTML 1.0, be sure the closing tag has a space before the "/". If NOT, using XHTML 1.0, remove all " /" from those tags that don't normally have closing tags. Might want to also validate both your CSS and HTML coding at the w3c.org's validators.

    Making an image a link:

    Code:
    <p><a href="URL path to external link" title="Mouseover Description"><img style="width: XXpx; height: YYpx; border: 0;" src="Path to image" alt="Text Description"></a></p>
    If site does not host images, then you MUST host your image online at any good image hosting site. The "src" image URL MUST be the DIRECT link to the image alone and not to the page the image is on. Put the correct link for the site in the href="" attribute. Put the DIRECT URL to ONLY the image in the src="" attribute.

    Text Link only:

    Code:
    <p><a href="URL path to external link" title="Mouseover Description">Link Text Description</a></p>
    You can change the "p" tags to div tags and style as needed.

    Practice Your Link Code Online
    Last edited by Major Payne; 06-22-2010 at 06:11 AM.
    ☠ ☠RON☠ ☠

  • #9
    Regular Coder
    Join Date
    Jun 2003
    Location
    California
    Posts
    231
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I got it to work now...on my desktop at least. Thanks.

    Now I have a question about tables. Can HTML format tables in this style?.http://tinypic.com/view.php?pic=10yqq0j&s=6

  • #10
    Regular Coder
    Join Date
    Aug 2005
    Location
    MS
    Posts
    850
    Thanks
    11
    Thanked 79 Times in 77 Posts
    Quote Originally Posted by velious View Post
    I got it to work now...on my desktop at least. Thanks.

    Now I have a question about tables. Can HTML format tables in this style?.http://tinypic.com/view.php?pic=10yqq0j&s=6
    Yes, but you would be better off coding to the latest web standards and NOT use tables for layouts. Just use tables for their originally intended purpose...data presentation.

    Might help...

    Tableless Web Design: http://en.wikipedia.org/wiki/Tableless_web_design
    Why tables for layout is stupid: http://www.hotdesign.com/seybold/
    How to convert manually your HTML tables to CSS: http://www.table2css.com/articles/co...-tables-to-css
    Images, Tables, and Mysterious Gaps: https://developer.mozilla.org/en/Ima...ysterious_Gaps
    ☠ ☠RON☠ ☠


  •  

    Posting Permissions

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