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

CSS & background images

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-28-2004, 11:49 AM
 
Smalls Smalls is offline
 

Advanced Member
  
Join Date: Apr 2004
Location: Ontario
Posts: 30
 

Default CSS & background images

I'm currently trying to get my CSS working here:
http://www.xtrememotions.ca/customer/home.php

It is attaching the CSS file because the text is changing color, but the images for the backgrounds and such never work.

Here's some sample code from the skin1.css file:
.rightside {
background-image: url({$ImagesDir}/d1-6__04.jpg);
background-repeat: repeat-y;
background-position: left top;
}

the images in the home.tpl file work fine though, for example:
<td width="168" align="left" valign="top" background="{$ImagesDir}/d1-6__07.jpg">

That works fine. I can get the CSS above to work just fine is don't use $ImagesDir and put in:
http://www.xtrememotions.ca/skin1/images/d1-6__04.jpg

in the place of {$ImagesDir}

Any ideas...???
Reply With Quote
  #2  
Old 04-28-2004, 12:10 PM
 
laureon laureon is offline
 

Senior Member
  
Join Date: Oct 2003
Posts: 171
 

Default

don't quote me on this, but I don't think Smarty tags can be rendered from within .CSS files. I was adding some background images to my css file and I had to put in the name of the image folder i.e. images/myimagename.gif rather than the varialbe {$ImagesDir}/myimagename.gif

You might want to try using the following in your css file:

background-image: url(images/d1-6__04.jpg);

*where 'images' is the name of the folder containing your site images
__________________
X-Cart Gold Version: 4.0.17
X-Configurator
X-AOM
X-FancyCategories
X-RMA
X-Offers
Reply With Quote
  #3  
Old 04-29-2004, 06:48 AM
  carlisleglass's Avatar 
carlisleglass carlisleglass is offline
 

eXpert
  
Join Date: Aug 2003
Location: Carlisle, UK
Posts: 316
 

Default

definantly makes sense ... the css is not actually a smarty template ... its loaded in as a stylesheet when the page is viewed !!

e.g.
Code:
<link rel="stylesheet" href="/skin1/skin1.css">
__________________
Darren Kierman
Carlisle Glass (http://www.carlisleglass.co.uk/)
... running X-Cart Gold 4.4.5 [unix]
Reply With Quote
  #4  
Old 04-29-2004, 02:20 PM
 
blue-dreamer blue-dreamer is offline
 

eXpert
  
Join Date: Dec 2002
Location: Northampton UK
Posts: 213
 

Default

That's correct you must put the relative location of the image in the the CSS file.
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 01:15 PM.

   

 
X-Cart forums © 2001-2020