Forums / Templates, Stylesheets, Page Layout / Logo and header_bg images being re-sized

Logo and header_bg images being re-sized

Views: 789

Results 1 to 8 of 8
27 Nov 2011, 9:26 AM
#1
paulr avatar

paulr

New Zenner

Join Date:
Nov 2011
Posts:
23
Plugin Contributions:
0

Logo and header_bg images being re-sized

Sorry if the answer to this is here somewhere already but I just can't get this to work properly (and I think I've read just about every related topic about logos here on the forum and on the wiki):

Using the default theme I replaced logo.gif with a new image 400x72 pixels and header_bg.jpg 760x110 i.e. new logo is bigger but background image is same size as original.

In includes/languages/english/custom/header.php I have:

  define('HEADER_LOGO_WIDTH', '400px');
  define('HEADER_LOGO_HEIGHT', '72px');
  define('HEADER_LOGO_IMAGE', 'logo.gif');

in /includes/templates/custom/common/tpl_header.php:

<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) . '</a>'; ?></div>

and in /includes/templates/custom/css/stylesheet.css

#logoWrapper{
	background-image: url(../images/header_bg.jpg); 
	background-repeat: repeat-x;
	background-color: #ffffff;
	height:110px;
	}

I can see that tpl_header.php in my /custom template directory is controlling output by putting some dummy text before the anchor).

The problem is that both images are being 'stretched'. If I right-click either image and view it in a new tab it appears at the correct size.

I'm Using 1.3.9h.

Help with this would be much appreciated

TIA

Paul

27 Nov 2011, 9:12 PM
#2
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

Re: Logo and header_bg images being re-sized

url to your site?

The Logo image size should ONLY be defined in: includes/languages/english/custom/header.php, while the Header background image size should be controlled from: includes/templates/custom/css/stylesheet.css, being sure to define not only the height, but also the width.

Upon seeing your site, we can actually SEE what the problem may be, and will be able to help MUCH better.

Teach them to shop and they will shop today;
Teach them to Zen and they will OWN a shop tomorrow!

27 Nov 2011, 9:30 PM
#3
paulr avatar

paulr

New Zenner

Join Date:
Nov 2011
Posts:
23
Plugin Contributions:
0

Re: Logo and header_bg images being re-sized

http://www.postcadia.co.uk - down for maintenance but you can see the problem - right click and view images to see actual size (excuse the primitive placeholder graphics/colours!)

Thanks

Paul

27 Nov 2011, 9:42 PM
#4
rescoccc avatar

rescoccc

Totally Zenned

Join Date:
May 2010
Location:
WA State
Posts:
1,700
Plugin Contributions:
2

Re: Logo and header_bg images being re-sized

They are showing the correct size for me. What browser are you using?

The best way to learn is to try stuff. But, back it up first.

27 Nov 2011, 9:50 PM
#5
paulr avatar

paulr

New Zenner

Join Date:
Nov 2011
Posts:
23
Plugin Contributions:
0

Re: Logo and header_bg images being re-sized

Firefox 8.0...tried IE and they do show correct size....eeek...just realised that problem is due to zoom setting in FF! :shocking::blush:

Thanks for the help.

Paul

27 Nov 2011, 9:50 PM
#6
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

Re: Logo and header_bg images being re-sized

Yep. After looking at your site..........they're showing correctly for me, as well. Have you tried clearing your cache, then viewing?

Teach them to shop and they will shop today;
Teach them to Zen and they will OWN a shop tomorrow!

27 Nov 2011, 9:54 PM
#7
paulr avatar

paulr

New Zenner

Join Date:
Nov 2011
Posts:
23
Plugin Contributions:
0

Re: Logo and header_bg images being re-sized

Get Em Fast:

Yep. After looking at your site..........they're showing correctly for me, as well. Have you tried clearing your cache, then viewing?

See above - it was just that I'd zoomed in at some point and not reset the view. How embarrasing!

27 Nov 2011, 10:07 PM
#8
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

Re: Logo and header_bg images being re-sized

PaulR:

See above - it was just that I'd zoomed in at some point and not reset the view. How embarrasing!

Ahhhhh.............I see. Looking at the timestamps, looks like we posted just about the same time. :)

Glad to see it's resolved.

Teach them to shop and they will shop today;
Teach them to Zen and they will OWN a shop tomorrow!