SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

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

    Link to photo in images file

    Hope I can explain this correctly...

    I want to add a link to a photo in my images file, but I want it to show as centered, and at larger size.

    I tried this: <a href="images/hillbilly.png" width="300" height="200"> PHOTO</a> and while it works, the photo is small and not centered. I realize I could use the <img src=, etc...> and actually display the photo, but I want the photo to be a surprise when someone clicks on a word.

    Is there something else I can do without making the photo an html page?

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,615
    Mentioned
    413 Post(s)
    Tagged
    7 Thread(s)
    Quote Originally Posted by Barnum View Post
    Is there something else I can do without making the photo an html page?
    No. Not unless you want to do something fancier like have the image on the page but hidden until the user clicks the link. But that will involve some CSS acrobatics. (Not too hard, but you still may not like it.) Putting it on its own HTML page is pretty simple, though, so that's what I'd suggest.

  3. #3
    SitePoint Evangelist Barnum's Avatar
    Join Date
    Oct 2008
    Posts
    413
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Okay, I made a separate page (html) for the photo. Now how do I link to it from say Wordpress.

    Do I reference it as <a href="http://www.website/photo.html">? I have tried a few things but nothing seems to work.
    Maybe it's Wordpress that's confusing me.

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,615
    Mentioned
    413 Post(s)
    Tagged
    7 Thread(s)
    Quote Originally Posted by Barnum View Post
    Do I reference it as <a href="http://www.website/photo.html">?
    That sounds to me like it should work fine. Perhaps if this is being entered into a WP entry field you should instead type the link text, highlight it, set it as a link in the editor and then provide the URL—that is, let WP turn it into a link. Feel free to post a link.


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
  •