Jump to content

tfurnivall

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

tfurnivall's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I'd like to use PHP to change a CSS 'background color' rule based on the date. I guess that every time the CSS page is referenced, I could go through the calculation of what color to use, but this would get real old, real fast! (This is a determination of the appropriate liturgical color, and involves getting the date of Easter for the current year, and then figuring our whereabouts in the Church calendar we happen to be). Things get slightly more complex because the seasons have some options (Advent can be Purple or Blue, for example). Any ideas about how I can accomplish this? I'm thinking that the following might work: i) Establish a session variable called liturgical_color, and then use a short script to put it into a style sheet in among all the other style commands: ii) <?php echo "background-color:".$_SESSION['liturgical_color']".";"; ?> My question: Do browsers (or most browsers?) handle css directives out of a php script? Any help gratefully appreciated! Tony (What ever happened to COBOL ;-)
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.