SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Evangelist Barnum's Avatar
    Join Date
    Oct 2008
    Posts
    413
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Thumbnail Question

    Taking beginner class in HTML, and currently trying to put together a website for my wife. Can someone please explain (code) how I can put images (thumbnails) in my site that can be clicked on to show full size?

    I can insert images fine, and can adjust sizes, etc...just cannot figure out how to write the correct code for "clickable" thumbnails.

    Hope my question makes sense. Any help is very much appreciated.

  2. #2
    SitePoint Evangelist ferrari_chris's Avatar
    Join Date
    Mar 2008
    Location
    NP, New Zealand
    Posts
    576
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Barnum, welcome to SitePoint.

    All you want to do is make the image a link. So wrap <a> </a> around the image you want.

    Like so:

    Code HTML4Strict:
    <a href="your_large_image"><img src="your_small_image"></a>

    Also, it's best to create smaller images to use for the thumbnails and not use HTML to resize the images smaller. This is for both quality (if you resize the image with HTML the quality degrades) and for bandwidth reasons (the user will still download the large image, only it'll be displayed at the smaller size).

    Hope that makes sense.

  3. #3
    SitePoint Evangelist Barnum's Avatar
    Join Date
    Oct 2008
    Posts
    413
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the quick reply and suggestion. Will give it a whirl. Sorry to be late responding...just busy. Will let you know how I fare.

  4. #4
    SitePoint Evangelist Barnum's Avatar
    Join Date
    Oct 2008
    Posts
    413
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Chris, your suggestion worked like a charm. Had to finagle sizes, etc., but I now have it working. Thanks very, very much....

    I just finished a continuing education class on beginning html, and have signed up for the follow-up class. Suspect I will be back on this forum very soon with more questions.

    Thanks again.


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
  •