• Hi if you go to my blog https://www.thepoliticalteen.net .. you will see my header is not clickable. How do I make it clickable without it going anywhere from where it is now. I say that because when I put this code in my Stylesheet:

    #header
    {background: transparent url(https://thepoliticalteen.net/header.gif) no-repeat 3px 0px;
    display: block;
    width: 732px;
    height: 200px;
    }

    and this code in my header.php:

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

    It puts a copy of the image outside of the blog at the top, while the main image stays where it’s at and not clickable.

    Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • I’m sure there’s a need to use an onclick and javascript simple for a link.

    This is the structure I use:

    <div id=”header”><img src=”header.jpg” /></div>

    You could try that and see how that works for you.

    If you want to put text in there, in the header, set the image as background and position the text as needed.

    Thread Starter ian2

    (@ian2)

    Thanks I try that but again it makes another header at the top .. Currently in my header.php I have this in there (already):

    <tr>
    <td colspan=”3″ width=”0″ height=”131″ bgcolor=”#000040″ valign=”top”>
    <img border=”0″ src=”https://thepoliticalteen.net/header.gif&#8221; width=”792″ height=”131″></td>
    </tr>

    Thread Starter ian2

    (@ian2)

    Just go to my blog https://www.thepoliticalteen.net and you will see that my header is somewhat “embedded” (if you will) with the rest of the blog. I just want to make that banner of the area where the banner is .. clickable ..Thanks

    This is confusing. Your first post talks about using a div for your header, and the prescribed solution for making the header clickable. However now you are revealing it’s actually a table that the header is in. That would explain why the first solution didn’t work.
    IF you use jdingman’s solution within the table, it should work.
    <a href="http:https://www.thepoliticalteen.net/"><img border="0" src="https://thepoliticalteen.net/header.gif" width="792" height="131"></a>
    I won’t get into the issues of valid code, or web standards, you’ve got over 175 errors on your page as it is now…but this should make the header clickable to take you back to the main page.

    Thread Starter ian2

    (@ian2)

    Thank you, it worked!

    Thread Starter ian2

    (@ian2)

    I have one more question … in Mozilla the header is on the left, and not centered. In Internet Explorer it is centered. How do I make it centered?

    if you’re worried about errors now you might as well start buffing away each error as you go along. I’m sure one of the mentioned 175 pretain to your header

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