Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

header_bg.jpg needs to "stretch" according to resolution settings

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 08-26-2008, 06:16 PM
  razorblade's Avatar 
razorblade razorblade is offline
 

Advanced Member
  
Join Date: Oct 2005
Posts: 39
 

Default header_bg.jpg needs to "stretch" according to resolution settings

my header_bg.jpg looks great if the monitor res is set to 1024x768. but on my large monitor with higher res settings the image does not cover the area. a white background is left outside the area of the .jpg image, making some of the speedbar links to disappear (as the speedbar text is white). i looked and couldn't find a fix. please help!!
__________________
/razorblade pro/
v 5.2.21
linux 2.2.29
Reply With Quote
  #2  
Old 08-27-2008, 12:26 AM
  Piotr M.'s Avatar 
Piotr M. Piotr M. is offline
 

Senior Member
  
Join Date: Aug 2008
Posts: 134
 

Default Re: header_bg.jpg needs to "stretch" according to resolution settings

The easiest way is to set background color for html element containing your head same as jpg main background.

You can also stretch it using javascript if it is insert with <img> tag, but it won't look nice.
__________________
Regards,
Piotr Markushin

X-Cart PDF Catalog Generator NEW
Professional X-Cart Skins Store (7 new skins added in August 2008!)

ahedOffice.com - Web 2.0 Online Groupware
Reply With Quote
  #3  
Old 08-28-2008, 10:51 AM
  razorblade's Avatar 
razorblade razorblade is offline
 

Advanced Member
  
Join Date: Oct 2005
Posts: 39
 

Default Re: header_bg.jpg needs to "stretch" according to resolution settings

i could set the background to black. where do i set the header.jpg to center instead of align left?
__________________
/razorblade pro/
v 5.2.21
linux 2.2.29
Reply With Quote
  #4  
Old 08-28-2008, 11:50 PM
  Piotr M.'s Avatar 
Piotr M. Piotr M. is offline
 

Senior Member
  
Join Date: Aug 2008
Posts: 134
 

Default Re: header_bg.jpg needs to "stretch" according to resolution settings

I can't answer this question without looking at the зфпу.
__________________
Regards,
Piotr Markushin

X-Cart PDF Catalog Generator NEW
Professional X-Cart Skins Store (7 new skins added in August 2008!)

ahedOffice.com - Web 2.0 Online Groupware
Reply With Quote
  #5  
Old 12-11-2008, 07:05 AM
 
auc auc is offline
 

Member
  
Join Date: Jul 2007
Posts: 10
 

Default Re: header_bg.jpg needs to "stretch" according to resolution settings

Did you find out how to center image instead of align left?

If so, please post solution.

Thanks,
__________________
All USA Catalog
X-Cart Gold 4.1.9
Reply With Quote
  #6  
Old 12-19-2008, 04:21 AM
  alarnold's Avatar 
alarnold alarnold is offline
 

Advanced Member
  
Join Date: Jan 2008
Posts: 33
 

Default Re: header_bg.jpg needs to "stretch" according to resolution settings

Quote:
Originally Posted by auc
Did you find out how to center image instead of align left?


Edit Skin1 / Head.tpl

Code:
{* $Id: head.tpl,v 1.58.2.3 2008/02/07 13:17:30 ferz Exp $ *} <table cellpadding="0" cellspacing="0" width="100%" background="{$ImagesDir}/background.jpg"> <tr align="center"> <td><a href="{$http_location}/"><img src="{$ImagesDir}/Header.jpg" alt="" /></a></td>


The background.jpg and Header.jpg files need to uploaded to skin1/images.

Note: Your background,jpg image should be the same height as your Header.jpg image and only 1 or 2 pixels in width.


See it in action here: www.arnoldcoin.com

Al
Arnold Coin Exchange
__________________
X-Cart version 4.7.12 Platinum

arnoldcoin.com

Change is inevitable, except from a vending machine
Reply With Quote
  #7  
Old 12-19-2008, 03:32 PM
  Vacman's Avatar 
Vacman Vacman is offline
 

X-Adept
  
Join Date: Sep 2005
Location: Torrance, CA
Posts: 792
 

Default Re: header_bg.jpg needs to "stretch" according to resolution settings

On your example - You should notice that the border image does not extend all the way across the banner....
__________________
Carl Tice

X-Cart 4.6.6
X-Payments 3.0
ReBOOT 3.4.1

PHP 5.6.30
MySQL 5.6.35
Linux 2.6.32-042stab120.18
ionCube PHP Loader v4.7.3
Perl 5.10.1
Reply With Quote
  #8  
Old 12-20-2008, 12:23 AM
  alarnold's Avatar 
alarnold alarnold is offline
 

Advanced Member
  
Join Date: Jan 2008
Posts: 33
 

Default Re: header_bg.jpg needs to "stretch" according to resolution settings

Quote:
Originally Posted by Vacman
On your example - You should notice that the border image does not extend all the way across the banner....

True, my Header.jpg file does not stretch across the entire screen for resolutions higher than 800 pixels in width.

One problem is that stretching images tends to distort them. Another is that if your graphic image is wider than their screen resolution, they are stuck using the scroll bar to view the site.

I choose to use a 800 pixel width image and use a background for resolutions greater that 800 pixels. This way I can accommodate the folks that still use low resolution monitors.

To properly accomplish this feat, you would capture their screen resolution and load the proper width Header image. This also entails using multiple Header images, one for each different resolution that you plan to support. When I find 26 hours in a day, I shall tackle this problem!

Al
__________________
X-Cart version 4.7.12 Platinum

arnoldcoin.com

Change is inevitable, except from a vending machine
Reply With Quote
  #9  
Old 12-20-2008, 09:01 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: header_bg.jpg needs to "stretch" according to resolution settings

Moving to Template Editing forum
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:40 PM.

   

 
X-Cart forums © 2001-2020