Making a header image a link

  • Unknown's avatar

    I have set a custom header image on the blog, but I can’t seem to get it to let me make it a link. I’m trying to make it a link to the home page so that if you click elsewhere (such as who we are) you can find your way to the home page without me adding a link on the side. I’ve tried the typical html for a link (a href) but that’s not helping much in the css file.

    I’m using the Paperpunch theme if that helps.

    Thank you!

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    First off, nice job on the colors and such.

    Create a blank, transparent PNG image with no background color the size of your header image, put it into a text widget and link it to your main site page. I’ve got to go out for about an hour, but post back here when you get that done and I’ll give you the CSS to move that text widget/linked blank image up and over the top of your header image to make it clickable.

  • Unknown's avatar
    yscsportsmentaledge · Member ·

    Thank you!

    I made a blank image, and put it into a text widget (I think) on my sidebar. It’s been a while since I’ve done anything with html/css (and even then it was basics) so I hope I got it right.

  • Unknown's avatar

    Here is the code you need to have in the text widget to link the image to the main page of the site.

    <a href="http://yscsportsmentaledge.wordpress.com/"><img alt="" title="" src="http://yscsportsmentaledge.files.wordpress.com/2011/12/transparent-logo.png"></a>

    This will move the text widget up and over the image and turn the background of the widget transparent.

    #wrapper {
    position: relative;
    }
    
    #sidebar #text-3 {
    background: transparent;
    border: none;
    }
    
    #text-3 {
    position: absolute;
    top: 0;
    left: 95px;
    height: 210px;
    }
  • Unknown's avatar
    yscsportsmentaledge · Member ·

    Ah, I didn’t do the link, just the image. I apologize for that!

    Thank you so much for the help, it’s perfect!

  • Unknown's avatar
  • Unknown's avatar

    And no apologies necessary.

  • The topic ‘Making a header image a link’ is closed to new replies.