Support » Fixing WordPress » Making Header Linkable

  • dirtyscarab


    I’ve read how to make headers linkable, but the trouble is, my header is part of my background image.

    is there any way to make the ‘image/flowers.jpg’ shown below linkable??

    My site: Link

    My code inside the style.css:

    background:url(images/flowers.jpg) left no-repeat #FFF;

    #header .inside{
    padding: 7em 0px;

    #header h2{
    border-right: 1px solid #808080;
    float: left;
    font-size: 2.25em;
    margin: 0px 0.5em 0px 0px;
    padding: 0px 0.5em 0.25em 0px;

    #header h2 a{
    color: #000000;
    text-decoration: none;

    #header p{
    line-height: 1em;
    margin: 0px;
    padding: 1em 0px;

Viewing 5 replies - 1 through 5 (of 5 total)
  • Adam Brown


    The easiest way is to take the image out of the CSS and put it into an <img ... /> tag surrounded by <a> tags.



    Another option… and you should have found this because it is from here, from the forum:
    <div id="header" onclick="location.href='';" style="cursor: pointer;">
    This should be done in the header.php file.

    Adam Brown


    I guess I mispoke; moshu’s solution is the easiest. But if you have any blog visitors with non-javascript browsers (mainly blind folks), though, take the non-javascript route.

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    A non-javascript way to do it is to put the link inside your header DIV, and then use CSS to give the link absolute position and size (same size as the header DIV).

    The general technique is like this:

    <div id="header">
    <a href=""></a>
    #header a { position:absolute;
    	left:0px; top:0px; width:600px;	height:150px; }

    Or whatever works for your positioning.

    Also, I’d make that header image centered if I were you. Looks way better centered instead of shoved over to the left.



    Brilliant. Thanks Guys.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Making Header Linkable’ is closed to new replies.