Re: The CSS battle continues...
| From: | Maxim Maletsky | Date: | Wed, 23 Oct 2002 16:55:10 +0000 |
| Subject: | Re: The CSS battle continues... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-121130@lists.php.net to get a copy of this message | ||
Access CSS file directly from your browser. And, call it .php (you did
so, didn't you?). Anyway, it does not matter where the file is anyway.
--
Maxim Maletsky
maxim@php.net
www.PHPBeginner.com // PHP for Beginners
www.maxim.cx // my Home
// my Wish List: ( Get me something! )
http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3
Liam.Gibbs@dfait-maeci.gc.ca wrote... :
> Well, I've made progress. Found below this message is my CSS file, in PHP. I
> figured out now that if I make a linked style sheet by way of <LINK REL =
> \"STYLESHEET\" HREF = \"Stylesheet.php\" TYPE = \"TEXT/CSS\">,
> what it will
> do is it will run the sheet properly until it reaches the first IF
> statement. If I include the style sheet, though, it runs it properly. Any
> ideas?
>
>
>
> =========================
>
> <?PHP
> print("BODY { Color: #FFFFFF; Background-Color: #000000; Text-Align:
> Justify; Scrollbar-Base-Color: #005500;\n");
> print("TD { Padding-Left: 5px; Padding-Right: 5px; }\n");
> print("A { Color: #FF0000; Text-decoration: None; Font: Bold;
> Font-Family: Schoolbook; }\n");
> print(".regular { Text-Align: Justify; }\n");
> print(".title { Color: #FFFFFF; Background-Color: #000000;
> Text-Align: Center; Font: Bold; Line-Height: 3em; }\n");
> print(".header { Color: #FFFFFF; Background-Color: #000000; Font:
> Bold; }\n");
> print(".bulletin { Color: #FFFFFF; Background-Color: #000000; Color:
> #0000FF; }\n");
> print(".fineprint { Color: #FFFFFF; Background-Color: #000000;
> Font-Size: X-Small; }\n");
> print(".error { Color: #FF0000; Background-Color: #000000;
> Text-Align: Center; }\n");
> print(".confirmation { Color: #FFFFFF; Background-Color: #000000;
> Text-Align: Center; Font: Bold; }\n");
> print(".footer { Color: #FFFFFF; Background-Color: #000000;
> Font-Size: X-Small; }\n");
> if(($page == "Grate") && ($code != "") && ($method !=
> "")) {
> if(($connection = @mysql_connect("localhost", "root", ""))
> && (mysql_select_db($databasesource))) {
> $query = mysql_query("SELECT Formatting FROM method
> WHERE Code='$code'");
> if($result = mysql_fetch_row($query)) {
> $components = explode($result[0], ",");
> print("P { Color: #$components[0];
> Background-Color: #000000; Text-Align: Justify; Text-Indent: 10px; }\n");
> print(".method-title { Color:
> #$components[1]; Background-Color: #000000; Text-Align: Center; }\n");
> print(".method-majorbreak { Color:
> #$components[2]; Background-Color: #000000; Text-Align: Justify; }\n");
> print(".method-minorbreak { Color:
> #$components[2]; Background-Color: #000000; Text-Align: Center; }\n");
> print(".method-footnotereference { Color:
> #$components[3]; Background-Color: #000000; Font-Variant: Superscript;
> }\n");
> print(".method-footnote { Color:
> #$components[4]; Background-Color: #000000; }\n");
> }
> @mysql_close($connection);
> }
> }
> ?>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>