Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Centering Logo.gif File.

Centering Logo.gif File.

Locked

Views: 3,404

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
24 Aug 2006, 11:54 AM
#1
chemdata avatar

chemdata

New Zenner

Join Date:
Aug 2005
Posts:
27
Plugin Contributions:
0

Centering Logo.gif File.

I have replaced the logo.gif file with my own logo.gif file but with the same name. I have removed the tagline. Now I would like to center my logo.gif file in the space that the original logo.gif occupied. Using the Logo float setting I can only get the image to move to the left or the right but not centered. Even better I would like it not only to be centgered but to occupy all the space therein. Thanks.

24 Aug 2006, 1:30 PM
#2
tinas avatar

tinas

Totally Zenned

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

Re: Centering Logo.gif File.

Change #logo to
$logo
{text-align: center;
margin: auto}

In the file YOURTEMPLATE/COMMON/tpl_header.php

change the <div class="logo"> to <div id="logo">

Should center right up.

Hope that helps

25 Aug 2006, 2:06 AM
#3
chemdata avatar

chemdata

New Zenner

Join Date:
Aug 2005
Posts:
27
Plugin Contributions:
0

Re: Centering Logo.gif File.

Thanks Tina. That work as you indicated.

Now I have a rectangle within a rectangle. How can I fill up the outer rectangle with the image in the inner rectangle. I can control the padding above the inner rectagle by changing the padding- top in the css file:
#logo {
text-align: center;
PADDING-RIGHT: 0px;
PADDING-LEFT: 0px;
PADDING-BOTTOM: 0px;
VERTICAL-ALIGN: middle;
PADDING-TOP: 10px
}

However, the padding-bottom does not control the space beneath the inner rectangle. Once again thanks.

25 Aug 2006, 12:26 PM
#4
kschmid avatar

kschmid

New Zenner

Join Date:
Jul 2006
Posts:
13
Plugin Contributions:
0

Re: Centering Logo.gif File.

I am interested in centering my logo as well...though can't find the file/directory you seem to be referencing...

Could you tell me in which file do I need to change the "#logo to $logo"?

25 Aug 2006, 1:39 PM
#5
tinas avatar

tinas

Totally Zenned

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

Re: Centering Logo.gif File.

On filling the outer box - you will want to use your logo as a header background - or do a little tweeking to the inlcudes/templates/YOURTEMPLATE/tpl_header.php

As for which file we are referring to in centering the logo - it is includes/templates/YOURTEMPLATE/css/stylesheet.css

OHHHH and I see a typo in my own code there
Change #logo to
$logo
{text-align: center;
margin: auto}

SHOULD READ :

Change #logo to
#logo
{text-align: center;
margin: auto}

Hope that helps

25 Aug 2006, 2:01 PM
#6
kschmid avatar

kschmid

New Zenner

Join Date:
Jul 2006
Posts:
13
Plugin Contributions:
0

Re: Centering Logo.gif File.

Thanks for your reply Tina!

I'm sorry to be a pain...but I don't see a line of code with "#logo" at all in my stylesheet...

Also, I don't want to make the logo fill the whole space, but I am concerned that I don't have the tpl_header.php file in the /my_template directory...

25 Aug 2006, 2:09 PM
#7
tinas avatar

tinas

Totally Zenned

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

Re: Centering Logo.gif File.

You can add the code for the logo to the end of the stylesheet.

If you don't see the tpl_header.php in your custom template it is because you haven't modified that file. You only want to put your modified files into the overe ride directory.

25 Aug 2006, 6:57 PM
#8
chemdata avatar

chemdata

New Zenner

Join Date:
Aug 2005
Posts:
27
Plugin Contributions:
0

Re: Centering Logo.gif File.

Tina, once again thanks. Every worked like a charm. BTW the tpl_header.php file is located in inlcudes/templates/YOURTEMPLATE/common/tpl_header.php .

Although this has nothing to do with this discussion I was wondering if it wouldn't be simpler to just create a my_template subdirectory under includes/templates and then just copy the includes/templates/template_default files into it. In this way you would just constantly work from the files in includes/templates/my_template continously without having to recall if in fact you ported them over prior to working on them?

Once again thanks.

9 Sep 2006, 6:37 PM
#9
bjraines avatar

bjraines

Zen Follower

Join Date:
Jun 2006
Posts:
223
Plugin Contributions:
0

Re: Centering Logo.gif File.

Where can you change the logo's dimensions in the html?

9 Sep 2006, 7:50 PM
#10
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,606
Plugin Contributions:
0

Re: Centering Logo.gif File.

languages/english/header.php - make a copy and add it to your language override after editing.

17 Sep 2006, 6:17 AM
#11
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Centering Logo.gif File.

quiltingmom:
You have this image named banner.gif...try backing out what you changed to use banner.gif. If this was previously an entry for logo.gif then replace it with logo.gif.
Rename your banner.gif to logo.gif and now the css will be able to address it.

chemdata:
Bad practice to copy all the files to your template override folders. As when you will upgrade you will have many files that must be checked for changes to be able to use. Best practice is to only place files that you edit into the overrides structure.