WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Title Graphic hyperlink not working! (3 posts)

  1. loconzly
    Member
    Posted 6 years ago #

    Greetings,

    I am trying to make my Title Graphic as a hyperlink , but I can't get it to work for the life of me.

    The trouble is that the image is referenced in the stylesheet and not the header.php document.

    I've tried plugging in the a href= tag all over the place and cannot get it to activate the graphic as a hyperlink.

    Here is the header.php. Where should my href go?? Thanks!

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">

    <head profile="http://gmpg.org/xfn/11">
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />

    <title><?php bloginfo('name'); ?><?php wp_title(); ?></title>

    <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats please -->

    <style type="text/css" media="screen">
    @import url( <?php bloginfo('stylesheet_url'); ?> );
    </style>

    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
    <link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
    <link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" />

    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    <?php wp_get_archives('type=monthly&format=link'); ?>
    <?php //comments_popup_script(); // off by default ?>
    <?php wp_head(); ?>
    </head>

    <body>

    <div id="container">
    <div id="header">
    <div class="description">
    </div></div>

    <?php get_sidebar(); ?>

    <div id="content">
    <!-- end header -->

  2. ladydelaluna
    Member
    Posted 6 years ago #

    You're going to have to pull the image out of the CSS as a background, and place it in the header.php file, wrapped in link tags, in order to make that happen.

    You can't make it clickable in CSS, only in HTML... if that makes sense.

  3. loconzly
    Member
    Posted 6 years ago #

    I thought that was true, and was about to do it, but found this alternate method, which works great and is simple:

    <div id="header" onclick="location.href='http://therantpack.com';" style="cursor: pointer;">

Topic Closed

This topic has been closed to new replies.

About this Topic