• Resolved xiaozhu

    (@xiaozhu)


    Hi there !

    I have the easiest question ever… but yet I can’t seem to be able to figure it out myself.

    I’m trying to make my graphic header clickable. Sounds easy enough – but not this time for some reason !

    I’d be really grateful is someone could give me a hand. I did read a lot and did a lot of trial and mistake but I seem stuck.

    Thanks !

    My header.php code can be found here : Header.php

    My blog is Correr Es Mi Destino

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter xiaozhu

    (@xiaozhu)

    Please, let me know if I should add more info or anything to help solve this – bugging – problem ! ??

    the image you have for your header is set as a background for #header, I guess.

    if you want the header image clickable, take it off the background, and put the <img> tag in the header, surrounded by a link.

    Seems you’ve done plenty of that already in your theme, so its not the HTML knowledge that you’re lacking.

    You can also set a fixed width and height of your header image area to match the size of your background image on the a tag. That should work also.

    Thread Starter xiaozhu

    (@xiaozhu)

    Thank you both for your help.

    In the header.php, I change my header url for :

    <img src=”https://myheaderimage.jpg” width=”1024px” height=”980px”>

    However, I’m not sure what to do with my CSS. If I remove the #header, my header doesn’t show up (duh).

    Any idea ?

    all you need to do is remove the background from the #header section in your css, that’s all.

    you also need to surround your new image with an anchor tag, to make it into a link.

    Thread Starter xiaozhu

    (@xiaozhu)

    Okay, gotcha !

    Thanks !

    For Default/Kubrick Theme, this works:

    From: https://codex.www.ads-software.com/Designing_Headers

    You can use the method offered by the Theme’s author to make the entire WordPress Default/Kubrick Theme header clickable:

    * Open header.php template file.
    * Change from <div id=”header”> to:

    <div id=”header” onclick=”location.href=’https://siteaddress/&#8217;;” style=”cursor: pointer;”>

    Hi,

    I just used the method for making your header clickable, but now my logo is in the middle! It was on the left.

    My questions are:
    – How can I get it back on the left
    – Now my whole header is clickable, can i also anly make my logo clickable instead of the whole header?

    I’m sorry I’m a dummy….

    Thanks in advance!

    * Open header.php template file.
    * Change from <div id=”header”> to:

    <div id=”header” onclick=”location.href=’https://siteaddress/&#8217;;” style=”cursor: pointer;”>

    This the way to go. Thank you flapjacker

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Making a clickable header’ is closed to new replies.