PHP newbie needs help with PHP/CSS to colour code sections
Posted: Mon Aug 03, 2009 6:06 am
I have written code in xhtml for a site the links to my CMS system and I want to automatically colour code each section of the site.
I am using template pages, where the same template serves each section I would like to link the css to a variable in the php code so that it defines the colour of various elements of the page in the css.
I am trying to avoid having to create 8 versions of the css, one for each section, as making changes in the future would be a pain
So - for example I can define SECTIONcolour=1 in the php and I want the css to treat this as a variable and display color: #808080;
See the following link
http://clientwebsites.co.uk/absolute/
I'm sure its simple for one of you talented coders!
Any help would be much appreciated.
Thanks
MCR
I am using template pages, where the same template serves each section I would like to link the css to a variable in the php code so that it defines the colour of various elements of the page in the css.
I am trying to avoid having to create 8 versions of the css, one for each section, as making changes in the future would be a pain
So - for example I can define SECTIONcolour=1 in the php and I want the css to treat this as a variable and display color: #808080;
See the following link
http://clientwebsites.co.uk/absolute/
I'm sure its simple for one of you talented coders!
Any help would be much appreciated.
Thanks
MCR