This should be easy but I am having difficulty. I want to make the header image a link

here is the CSS from the style sheet that pertains to the header
/*------HEADER------*/
.header { background:url(images/bg-top.gif) top repeat-x; height:116px;}

.logo { margin:50px 0px 0px 35px;}
/*.sitename {font-size:24px; line-height:30px; font-weight:normal; padding:35px 0px 0px 0px; text-transform:none; letter-spacing:-1px;}
.sitename a { color:#1d1d15; text-decoration:none;}*/
.slogan { margin:75px 0px 0px 266px;}

What do I need to add to this? Do I need to add something to the page.tpl? This is the code from

// $Id: page.tpl.php,v 1.25 2008/01/24 09:42:53 goba Exp $


print $language->language " xml:lang=" print $language->language " dir=" print $language->dir ">

print $head_title

print $head
print $styles
print $scripts

if ($logo) :
print $front_page " title=" print t('Home') ">Only local images are allowed. print($logo) " alt=" print t('Home') " border="0" class="logo" />
endif;
if (isset($primary_links)) :
print theme('links', $primary_links, array('class' => 'links primary-links'))

endif;
if ($breadcrumb != ""):
print $breadcrumb
endif;

if ($left != ""):
print $left

endif;

if ($mission != ""):
print $mission

endif;

if ($tabs): print '<div id="tabs-wrapper" class="clear-block">'; endif;

 if ($title): print '
                                                                            <h2'. ($tabs ? ' class="with-tabs title"' : '') .'>'. $title .'</h2>
                                                                        '; endif; 

if ($tabs): print '<ul class="tabs primary">'. $tabs .'</ul></div>'; endif;
if ($tabs2): print '<ul class="tabs secondary">'. $tabs2 .'</ul>'; endif;

if ($show_messages && $messages != ""):
print $messages
endif;

if ($help != ""):

print $help

endif;

print $content;

if ($right != ""):
print $right

endif;

print $closure;

that file

Comments

zbricoleur’s picture

It would be better to show us all of the tpl.php file, not just the php bits. But I can tell you that as it is currently set up, you can't make the header image per se a link, because it's the background image for (presumably, can't tell without seeing the HTML) a div. You would have to use the image as an image (i.e., in an img tag) to be able to wrap it in anchor tags.

However, you may be able to make the entire header div a link. Check out http://almosteffortless.com/2006/05/25/make-a-div-into-a-link/ , or Google "make div a link"

MishelM’s picture

I got it works beautifully!!