Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Changing width and height of logo.gif

Changing width and height of logo.gif

Locked

Views: 4,996

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
6 Jun 2007, 3:31 PM
#1
taf avatar

taf

New Zenner

Join Date:
Jun 2007
Posts:
58
Plugin Contributions:
0

Changing width and height of logo.gif

Hi,

I've been changing the logo image in header.php. This is all works fine and i can see my new image. I'm getting a few problems with changing the width and height. I tried changing the HEADER_LOGO_WIDTH and HEADER_LOGO_HEIGHT in header.php , but this did not changing the size of the image. When I did view source in the browser i could see that the width and height of <div id="logo"> where that of the original size of the gif image and not what i had entered into header.php.

I did some more investigation and found the file tpl_header.php. I could see that this is where the html is created. I added in the HEADER_LOGO.. (width and height) to the correct line in this file and now the re-sizing works.

So i've found out how to fix this but I was wondering why it was not working without my change to tpl_header.php.

BTW I have created a new template folder and all changes to files were made under this folder/s.

Thanks

6 Jun 2007, 5:38 PM
#2
zek avatar

zek

New Zenner

Join Date:
Jun 2007
Posts:
19
Plugin Contributions:
0

Re: Changing width and height of logo.gif

I am having the same issue, can you please post the correct line to put in the tpl_header as I am not great with php / css thanks:smile:

6 Jun 2007, 7:30 PM
#3
tinas avatar

tinas

Totally Zenned

Join Date:
Jan 2005
Location:
Lake Havasu, AZ
Posts:
1,090
Plugin Contributions:
0

Re: Changing width and height of logo.gif

Actually, what you should have done is simply change the height of #LogoWrapper in your css - you don't need to mess with tpl_header at all.

Look in your stylesheet and by default #LogoWrapper is set at 75px. you need to change that to the height of your logo and all should be well.

HTH

6 Jun 2007, 7:53 PM
#4
zek avatar

zek

New Zenner

Join Date:
Jun 2007
Posts:
19
Plugin Contributions:
0

Re: Changing width and height of logo.gif

thanks for your help, changed logowrapper but it just altered the position.

I then changing the following:

#logo {
width:19.1em /* To prevent the logo from resizing, simply delete or comment out this section */

and that worked. Strange as I do not remember having to do this in my last install, I only had to edit header.php

I am using the latest release of applezen so it could be an issue with that.

7 Jun 2007, 9:07 AM
#5
taf avatar

taf

New Zenner

Join Date:
Jun 2007
Posts:
58
Plugin Contributions:
0

Re: Changing width and height of logo.gif

Hi Zek,

Yes, I thought that all you have to do is change the header.php file as this tutorial says:

https://www.zen-cart.com/tutorials/index.php?article=125

So i agree, looks like something has changed here? what version are you using now and what version worked? I'm pretty new to this so I've only tried v1.3.7a, i think?

the line i changed in tpl_header.php was this:

<div id="logo"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT, HEADER_LOGO_WIDTH, HEADER_LOGO_HEIGHT) . '</a>'; ?></div>

I just added the HEADER_LOGO_WIDTH and HEADER_LOGO_HEIGHT to the end so it adds them into the html.

Otherwise it seems that the defines in header.php are not used. Therefore changing them does nothing.