WordPress.org

Ready to get started?Download WordPress

Forums

Problem with hotlink in header (9 posts)

  1. mulligan
    Member
    Posted 9 years ago #

    I recently put up a graphic in my header. I followed the tutorial but for some reason the hotlink in the header is only happening in the very top of the graphic. Can someone help me figure out what is wrong?

    My site is now located at
    http://www.cantkeepquiet.com

    Thanks.

  2. moshu
    Member
    Posted 9 years ago #

    You put the graphic as a background image and that is never clickable! Put it in the header div and alter your css accordingly.

  3. mulligan
    Member
    Posted 9 years ago #

    Actually, I did exactly what it said to do here:

    http://www.tamba2.org.uk/wordpress/graphicalcss/header/index.html

    I did put the image in the header. I also adjusted the css just like the tutorial above said to do. That's why I'm here to find out if there was anything else I should do that's not mentioned in the tutorial.

  4. moshu
    Member
    Posted 9 years ago #

    I agree, but that tutorial does NOT say the image will be clickable :)
    In your header div only this part of the code is a link:
    <h1><a href="http://cantkeepquiet.com">Can't Keep Quiet</a></h1>
    but actually it is "invisible" on your site because of your CSS.

  5. mulligan
    Member
    Posted 9 years ago #

    Okay. So how do I make the whole image clickable? I guess I'm not understanding what you mean when you say the header div. Are you talking about the wp-layout.css file or the index.php file?

  6. moshu
    Member
    Posted 9 years ago #

    The code I posted is from your index.php file.
    There might be other ways to achieve what you want, but I can think of only one now: in the above code instead of the text (=Can't Keep Quiet) put your title-image, and make the necessary changes in your CSS file.

  7. xaos
    Member
    Posted 9 years ago #

    If you want to make the entire '<div>' clickable then you can also use this javascript code and these css styles to make it look like a large link:

    '<div onclick="location.href='http://yourlink.com';" style="cursor: pointer;"><h1></h1></div>'

  8. NuclearMoose
    Member
    Posted 9 years ago #

    Which works nicely assuming your visitor allows JavaScript to run! :)

  9. mulligan
    Member
    Posted 9 years ago #

    Well, thanks for the help. I've tried a couple of things suggested and it either didn't make a difference or made it worse. I've also found out that the whole image is clickable in IE but only the top part is in Firefox. Right now I'm thinking it's a problem with browser differences more than anything else.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.