Zen Cart Logo

Logo Issue

Views: 2,233

Results 1 to 20 of 32
07 Nov 2017, 18:08
#1
stephenrose2006 avatar

stephenrose2006

New Zenner

Join Date:
Nov 2017
Location:
United States
Posts:
15
Plugin Contributions:
0

Logo Issue

I am having issues with my logo not sizing correctly.
i have changed in the header.php file to set my image size to 1200x300 but it is not sizing correctly. any help would be greatly appreciated

https://vinyliciousmama.com

07 Nov 2017, 19:40
#2
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,065
Plugin Contributions:
56

Re: Logo Issue

The logo image appears to be sized at 1200 x 300. If you want the image centered on the screen, update your stylesheet.css (line 128) to add

float: none; margin: 0 auto;

to the styling rules for the #logo block. It's currently being floated left.

07 Nov 2017, 23:58
#3
stephenrose2006 avatar

stephenrose2006

New Zenner

Join Date:
Nov 2017
Location:
United States
Posts:
15
Plugin Contributions:
0

Re: Logo Issue

Awesome! Thanks, that looks like it worked

08 Nov 2017, 16:52
#4
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,760
Plugin Contributions:
9

Re: Logo Issue

I don't see that it worked. As I am looking at it this morning, it is not centering.

You might want to look at the stylesheet.css line 30 where you commented out the float left. It looks as if you did it incorrectly. I would return the float left and then remove the #logo from the front of the call. That way, you don't mess with all the other items that need to be float:left; (notice the semi-colon at the end of the call - that's important)

Once you've done that, you only need to add text-align:center; to the end of line 128 in the stylesheet.css.

This is one of the pitfalls of (IMHO) going too far in consolidating stylesheets. Just take a look at line 3 of the stylesheet_colors.css. I you want to change the color of a link, you will also change the color in 25+ other things that you probably don't want to touch. You end up having to take the calls apart every time just one of those items needs to change.:(

Centering using css can be quite the adventure. Is the item in-line or block? Is vertical centering needed as well? CSS3 is calling for margin-right: -50% to be used as part of the call for centering a viewport.

Add a folder to your bookmarks called tips n tricks and add the info from http://tinyurl.com/jzvla8a to it. It will come in handy.:yes:

08 Nov 2017, 17:15
#5
stephenrose2006 avatar

stephenrose2006

New Zenner

Join Date:
Nov 2017
Location:
United States
Posts:
15
Plugin Contributions:
0

Re: Logo Issue

you are correct, it is not working

08 Nov 2017, 17:28
#6
stephenrose2006 avatar

stephenrose2006

New Zenner

Join Date:
Nov 2017
Location:
United States
Posts:
15
Plugin Contributions:
0

Re: Logo Issue

i have changed those lines and added the text-align:center but it still doesnt appear to work.

08 Nov 2017, 17:33
#7
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,065
Plugin Contributions:
56

Re: Logo Issue

It's looking good to me, i.e. the logo is centered.

08 Nov 2017, 17:36
#8
stephenrose2006 avatar

stephenrose2006

New Zenner

Join Date:
Nov 2017
Location:
United States
Posts:
15
Plugin Contributions:
0

Re: Logo Issue

ok cleared cache and it is centered now.
any ideas why it is not running entire from 1st side box to 2nd? i have set size to 1200x300 and that should be entire size i would think

08 Nov 2017, 17:39
#9
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,760
Plugin Contributions:
9

Re: Logo Issue

line 30 of stylesheet.css still has #logo, .centerBoxContents, .specialsListBoxContents, .categoryListBoxContents, .centerBoxContentsAlsoPurch, .attribImg {float:left;}change to```
.centerBoxContents, .specialsListBoxContents, .categoryListBoxContents, .centerBoxContentsAlsoPurch, .attribImg {float:left;}

Line 128 of stylesheet.css - Change```
#logo{margin:10px 0;}float: none; margin: 0 auto;
```to ```
#logo{margin:10px 0;}float: none; margin: 0 auto;text-align: center;
08 Nov 2017, 17:53
#10
stephenrose2006 avatar

stephenrose2006

New Zenner

Join Date:
Nov 2017
Location:
United States
Posts:
15
Plugin Contributions:
0

Re: Logo Issue

that is exactly what i have, my stylesheet.css is attached

08 Nov 2017, 17:56
#11
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,760
Plugin Contributions:
9

Re: Logo Issue

I see it now too.

First of all, you cannot control the size of a customer's browser. They may have a small screen with 1200 as the max with or a screen that handles 1600.

Secondly, trying to be too specific on item size when that item is going to be displayed on a desktop, phone, tablet, etc can be disastrous. That's why widths are generally presented in percentages versus an actual size.

You've hard-coded a width of 1200 when the responsive.css stylesheet uses max-width: 100%.

Maybe the simplest way to have the logo always fill the wrapper is to change the width and height calls in the includes/languages/english/responsive_classic/header.php file to '100%'

If you don't have an includes/languagges/english/responsive_classic/header.php file, edit the includes/languagges/english/header.php and save it as includes/languagges/english/responsive_classic/header.php.

08 Nov 2017, 18:05
#12
stephenrose2006 avatar

stephenrose2006

New Zenner

Join Date:
Nov 2017
Location:
United States
Posts:
15
Plugin Contributions:
0

Re: Logo Issue

no dice on setting to 100% now it doesnt show centered again.

08 Nov 2017, 18:14
#13
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,760
Plugin Contributions:
9

Re: Logo Issue

Line 128 of stylesheet.css shows```
#logo{margin:10px 0;}float: none; margin: 0 auto; text-align: center;}

Change to ```
#logo {float: none; margin: 0 auto; text-align: center;} 

Then, we'll work from there as the header.php is still reporting 1200 x 300

08 Nov 2017, 18:18
#14
stephenrose2006 avatar

stephenrose2006

New Zenner

Join Date:
Nov 2017
Location:
United States
Posts:
15
Plugin Contributions:
0

Re: Logo Issue

line 128 is fixed, here is my header.php

define('HEADER_LOGO_WIDTH', '100%');
define('HEADER_LOGO_HEIGHT', '100%');
define('HEADER_LOGO_IMAGE', 'logo.jpg');

08 Nov 2017, 18:44
#15
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,760
Plugin Contributions:
9

Re: Logo Issue

stephenrose2006:

line 128 is fixed, here is my header.php

define('HEADER_LOGO_WIDTH', '100%');
define('HEADER_LOGO_HEIGHT', '100%');
define('HEADER_LOGO_IMAGE', 'logo.jpg');
Which one?

You should have two:

  • The Original at includes/languages/english/header.php
  • The one that should show the 100% at includes/languages/english/responsive_classic/header.php

The second is where changes should be made. If you are making changes to the responsive_classic version, how are you editing the file? Using an ftp to edit can sometimes create a problem when we forget that we need to tell the ftp program to load the saved file.

08 Nov 2017, 19:50
#16
stephenrose2006 avatar

stephenrose2006

New Zenner

Join Date:
Nov 2017
Location:
United States
Posts:
15
Plugin Contributions:
0

Re: Logo Issue

i used notepad to edit it and i reuploaded it overwriting what was there

08 Nov 2017, 20:14
#17
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,760
Plugin Contributions:
9

Re: Logo Issue

Sorry to press you on this but, you haven't identified "it" and the site still shows 1200 x 300.

Do you have a file at includes/languages/english/responsive_classic/header.php? If you do, is that the one you have been editing?

08 Nov 2017, 20:18
#18
stephenrose2006 avatar

stephenrose2006

New Zenner

Join Date:
Nov 2017
Location:
United States
Posts:
15
Plugin Contributions:
0

Re: Logo Issue

/includes/languages/english/responsive_classic/header.php is what i am editing and that shows.

define('HEADER_SALES_TEXT', '');
define('HEADER_LOGO_WIDTH', '100%');
define('HEADER_LOGO_HEIGHT', '100%');
define('HEADER_LOGO_IMAGE', 'logo.jpg');

i am going to delete that and reupload it. may something is jacked up with it.

08 Nov 2017, 20:44
#19
stephenrose2006 avatar

stephenrose2006

New Zenner

Join Date:
Nov 2017
Location:
United States
Posts:
15
Plugin Contributions:
0

Re: Logo Issue

i think i got it now. thank you for your help

08 Nov 2017, 20:47
#20
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,760
Plugin Contributions:
9

Re: Logo Issue

You may have stumbled upon a four-year old problem that has not been fixed!

Please use the # sign above in the menu to add code from includes/templates/responsive_classic/common/tpl_header.php from around line 65 (<!-- bof branding display-->) to around line 191 (<!--eof branding display-->).

We may have to adjust that file.