"Ike" a écrit le 16/12/2003 :
> Suppose I am creating a web page from within php. The web page will utilize
> a style sheet. However, before I spawn this new page, I want to be able to
> change the values in the css, from, within say a javascript function in the
> page that will call the php-created page.
>
> How might I do this? Suppose I have the following css:
> .td1 {
> font: bold 10pt Helvetica;
> background: white;
> }
> .td2 {
> font: bold 10pt Helvetica;
> background: grey;
> }
> .trhead {
> font: bold 11pt Helvetica;
> background: white;
> }And I wish to change, say, the font and background values for
> the three divisions. Is anyone aware of a class for changing a css on the
> fly? Thanks, Ike
Generate the CSS file with PHP.
That's the way I do it : take data in DB from user (colors) then create
the CSS.
Actually the link to the CSS file in my HTML is a PHP script.
--
Have you read the manual ?
http://www.php.net/manual/en/