2 replies [Last post]
joolzhaines
joolzhaines's picture
Offline
newbie
Last seen: 18 years 6 weeks ago
Joined: 2004-08-25
Posts: 2
Points: 0

Hi,

Is it possible in *.css files to use variables, so I can set my color scheme at the start of the css so if I want to quickly change the colors I do not have to scroll through all my code. something like

mycoloryellow {#FFFF00}
mycolorred {#FF0000}

body{
background:mycoloryellow;
}

Thanks

Joolz

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 7 years 39 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

CSS files and variables

CSS itself does not have variables but this subject has been covered before on this forum, involving the use of PHP in style sheets for setting color variables, uncanny eh!

http://www.csscreator.com/css-forum/ftopic4047.html&highlight=php+variables

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

joolzhaines
joolzhaines's picture
Offline
newbie
Last seen: 18 years 6 weeks ago
Joined: 2004-08-25
Posts: 2
Points: 0

Thanks

Thanks