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

Add Background Image

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-23-2011, 10:05 AM
 
digiemp digiemp is offline
 

Senior Member
  
Join Date: Aug 2007
Posts: 192
 

Default Add Background Image

Hello,

My site is fixed width at

min-width: 780px;
max-width:970px;

and I want to add a static background image which would be visible to those with wider resolutions. I am able to add a background image, but I can't seem to get it how I'd like. The image, which I want on the outside of the template, never seems to show up right. Currently I'm making a 1440px wide image and setting it as the background. And of course, I add the subject to the edges of the image. This doesn't seem to be the right way to go though. I want the image fixed and static so that it doesn't move when a user scrolls.

Any suggestions?

Thanks,
__________________
version 4.4.2
Reply With Quote
  #2  
Old 02-23-2011, 10:10 AM
 
digiemp digiemp is offline
 

Senior Member
  
Join Date: Aug 2007
Posts: 192
 

Default Re: Add Background Image

Oh, I should add that I am familiar with the

background-repeat:no-repeat;
background-attachment:fixed;

and other commands. My problem is how to get the image where I want it. There has to be a better way than simply playing with the physical size of the actual image.

Thanks,
__________________
version 4.4.2
Reply With Quote
  #3  
Old 02-23-2011, 10:26 AM
 
balinor balinor is offline
 

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

Default Re: Add Background Image

background-position: center top;
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #4  
Old 02-23-2011, 12:20 PM
 
digiemp digiemp is offline
 

Senior Member
  
Join Date: Aug 2007
Posts: 192
 

Default Re: Add Background Image

Thanks, Ryan. But that doesn't seem to be the fix I need.

The middle content is affected still, meaning the image shows up everywhere and not just outside the defined template. The right and left columns are unaffected, that is, they appear normal which is good, but the image shows through the center column. How do I get the image just to display on the outside of the right and left columns, just for people with screen resolutions larger than 960 wide?

Also, the background does not affect the footer so this looks a little weird as well.
__________________
version 4.4.2
Reply With Quote
  #5  
Old 02-23-2011, 12:39 PM
 
Sunray Sales Sunray Sales is offline
 

Senior Member
  
Join Date: Dec 2010
Posts: 194
 

Default Re: Add Background Image

Can you give us a link to your site, we can quickly use firebug to determine the correct style you need for your background image to appear the way you want.

Without being able to play with your site, it would be a little difficult to determine the style needed.
__________________
4.4.2
www.sunraysales.com
HandsOnWebHosting
Reply With Quote
  #6  
Old 02-23-2011, 01:02 PM
 
digiemp digiemp is offline
 

Senior Member
  
Join Date: Aug 2007
Posts: 192
 

Default Re: Add Background Image

Attached is a screen shot showing what happens.
Attached Thumbnails
Click image for larger version

Name:	showing-background1b.jpg
Views:	325
Size:	95.3 KB
ID:	2453  
__________________
version 4.4.2
Reply With Quote
  #7  
Old 02-23-2011, 01:40 PM
 
digiemp digiemp is offline
 

Senior Member
  
Join Date: Aug 2007
Posts: 192
 

Default Re: Add Background Image

Okay, I added

background-color:#FFFFFF;

to the

#center-main

part and that helped. But the top content that isn't part of the products doesn't have an outline and it looks off. Also, the footer is still unaffected.

Currently the image is 100% fixed in place. Meaning that as my window resizes, the image does not. I can't always see it, depending on my window size. I would like the image to be just outside of the right and left columns, always just to the side of them. Currently I can get this to happen on the left, but the right depends on window size. Unless I just resize the image itself, which moves the image closer or farther from the right column. Is there a way to make the image fluid like the site itself?
__________________
version 4.4.2
Reply With Quote
  #8  
Old 02-23-2011, 02:59 PM
 
digiemp digiemp is offline
 

Senior Member
  
Join Date: Aug 2007
Posts: 192
 

Default Re: Add Background Image

Added

background-color:#FFFFFF;

to

#center {

and it looks a lot better. Instead of actually having an image, an object, I set the background to a color for now since I don't know how to make it relative.

Thanks,
__________________
version 4.4.2
Reply With Quote
  #9  
Old 02-24-2011, 05:43 AM
 
Sunray Sales Sunray Sales is offline
 

Senior Member
  
Join Date: Dec 2010
Posts: 194
 

Default Re: Add Background Image

Yes you are on the correct path in terms of what you want to accomplish. I would like to re-iterate, continue using Firebug and keep playing with the css until you get the desired results. Also keep track of them, so that you implement the final changes in your main.css.
__________________
4.4.2
www.sunraysales.com
HandsOnWebHosting
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 11:52 PM.

   

 
X-Cart forums © 2001-2020