This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Webmaster forum > November 2006 > css insert a variable inner a style.css file





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author css insert a variable inner a style.css file
nawfer

2006-11-19, 7:58 pm

is possible in a file stylecss

to use a variable varImage instead folders name?
?
background-image:url(varImage/home.png);
Mark Goodge

2006-11-19, 7:58 pm

On Sun, 12 Nov 2006 22:02:10 +0100, nawfer put finger to keyboard and
typed:

>is possible in a file stylecss
>
>to use a variable varImage instead folders name?
>?
>background-image:url(varImage/home.png);


Not in CSS itself. But there's no reason why the stylesheet can't be
generated dynamically, like any other page on your site, by the
scripting language of your choice. So, for example, in PHP you could
do this:

background-image:url(<?=$varImage;?>/home.png);

Mark
--
Visit: http://www.MotorwayServices.info - read and share comments and opinons
"If you never know truth then you never know love"
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews