WordPress.org

Ready to get started?Download WordPress

Forums

Making Header Background Image Clickable Link (15 posts)

  1. howephunny
    Member
    Posted 8 years ago #

    Is there a way to make the header background image a clickable link without using the h1 tag? I'd like the entire image I've created to be the link.

  2. Root
    Member
    Posted 8 years ago #

    Yes. Just add to the size of h1 with padding until it fills the whole header area.
    Then use text indent *cough* to move the text part of the h1 1000px to the left.
    I have one on my blog.

  3. howephunny
    Member
    Posted 8 years ago #

    Thanks Root ... I'll give it a try tonight.

  4. vinyl_barstool
    Member
    Posted 8 years ago #

    Can someone walk me through this step-by-step?

  5. Jinsan
    Member
    Posted 8 years ago #

    I believe that root has provided the step by step process in this instance? You need to provide more information

  6. iand
    Member
    Posted 8 years ago #

    Podz's css guide covers it in some detail:
    http://www.tamba2.org.uk/wordpress/graphicalcss/header/index.html (I think, its blocked by my work computer. If its not that page, its around there somewhere.

  7. NorthernPassages
    Member
    Posted 8 years ago #

    I use this:
    <div id="header" onclick="location.href='<?php bloginfo('url'); ?>';" style="cursor: pointer;">** put whatever else is in your header div here**</div>

    In your case it would be as follows just cut and paste:

    <div id="header"onclick="location.href='<?php bloginfo('url'); ?>';" style="cursor: pointer;">
    <div id="headerimg">
    </div>
    </div>

  8. vinyl_barstool
    Member
    Posted 8 years ago #

    What file would I paste that into?

  9. Jinsan
    Member
    Posted 8 years ago #

    put whatever else is in your header div

    ie your header.php. What NP said works great, I use that myself, at the same time the link provided for the guide will also tell you how to do it. Have you read it yet?

  10. vinyl_barstool
    Member
    Posted 8 years ago #

    Link doesn't work for me. But I will try it out NP's suggestions. Thanks for the help. Great community.

  11. Jinsan
    Member
    Posted 8 years ago #

    ah I see, I guess podz is upgrading or something. But Np's suggestion should woek fine

  12. Root
    Member
    Posted 8 years ago #

    You guys do realise that the posters name top right is a link to his blog ?

  13. howephunny
    Member
    Posted 8 years ago #

    Thank you very much NP ... it works great.

  14. NorthernPassages
    Member
    Posted 8 years ago #

    No problem!

  15. drdarrow
    Member
    Posted 8 years ago #

    How do I convert the 'onclick' above to make the url refresh a site to the '_top" so that clicking the header image restarts the whole 'frames" structure of my site: www.darrowart.com/blog ? Normally, I just make a link that is <a href="http://www.Darrowart.com/blog" target="_top"> but I don't know how to do this in a header... especially with the onclick thing

Topic Closed

This topic has been closed to new replies.

About this Topic