I noticed that while the CSS method I outlined above worked well in Firefox (and I think even IE7), that in Safari, it showed an annoying little missing-image-question-mark over my logo. So I set out to try the transparent GIF method.
Here is how you use a transparent GIF to create a clickable logo that links to your home page.
STEP 1:
In Photoshop, create a new file with a transparent background that is the exact size of your logo. Use Save For Web & Devices under the file menu to save it as a GIF file. (I named my file Transparent_Logo_GIF.gif.)
STEP 2:
Upload that file to your FTP server. Create a new folder for it if you like. I uploaded mine to /images/homepage
STEP 3:
-
Copy tpl_header.php which is located under /includes/templates/template_default/common to includes/templates/your_template_name/common
-
In that file find (around line 71)
<!--bof-branding display-->
<div id="logoWrapper">
and add right after it
<a href="/"><img src="/images/homepage/Transparent_Logo_GIF.gif" alt="Your Store's Name Logo" /></a>
(changing the GIF's filename and filepath to whatever you used, of course...)
You'll notice in the very next line there's this line
<div id="logo"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'
which would seem to promise a clickable link to your homepage. But in my install it didn't work like that and in fact, again just showed up as a stray link that cluttered my logo. So I removed it via CSS like this:
STEP 4:
Open /includes/templates/your_template_name/css/stylesheet.css and add this line which will make that link invisible.
#logo a {
display:none;
}
(I suppose I could have just deleted it from tpl_header.php, but I wasn't sure if it might serve other purposes and removing it via CSS was fast and easy.)
Anyway, while both ways work, using this transparent GIF is the method I wound up going with as it seems to work and look good in all the browsers I've tested.
Hopefully this will be helpful for someone else. :smile:
Zen Cart 1.3.8a - Database Patch Level: 1.3.8 - PHP Version 5.2.6