X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   CSS & background images (https://forum.x-cart.com/showthread.php?t=7354)

Smalls 04-28-2004 11:49 AM

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...???

laureon 04-28-2004 12:10 PM

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

carlisleglass 04-29-2004 06:48 AM

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">

blue-dreamer 04-29-2004 02:20 PM

That's correct you must put the relative location of the image in the the CSS file.


All times are GMT -8. The time now is 05:42 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.