Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > activating alternative style sheet with php

Reply
Thread Tools

activating alternative style sheet with php

 
 
brucie
Guest
Posts: n/a
 
      10-19-2003
In post <ReCkb.796$2o2.15876@amstwist00>
picayunish said...

>> http://usenet.alt-html.org/styles/cs...ger-thingy.php


> I noticed in a style sheet (e.g. style04.css) the following string
> *{color:black;background-color:#FFC066;}
> Why using the * and not e.g. body {color:black;background-color:#FFC066;} ?


i'm just in the habit of always starting my css with '*' for common
stuff. the file is just a demo, stop picking on me. <sob/>

--
brucie.
20/October/2003 06:30:59 am
 
Reply With Quote
 
 
 
 
picayunish
Guest
Posts: n/a
 
      10-19-2003
Toby A Inkster wrote in news:
> Fabian wrote:
>
>> Toby A Inkster wrote:
>>> One improvement to the above script would be to add a default
>>> stylesheet.

>>
>> And how should you do that? With an if then else structure?

>
> Well, I *was* going to leave it as an exercise to the reader, but since
> you asked:
>
> <!DOCTYPE whatever>
> <?php
> $s = $_GET['style'];
> if (!($s)) { $s = 'red'; } ?>
>
> <html>
> <head>
> <title>Example</title>
> <link rel="stylesheet" type="text/css" media="screen,projection"
> <?php echo ' href="styles/' . $s . '.css"'; ?> >


!
The php script (above) and a normal style sheet link works perfectly.
http://www.semi-conductor.nl/test/test2.php (php scripts)
http://www.semi-conductor.nl/test/test3.php (a style sheet link + php
script & it validates )
--
Edwin van der Vaart
http://www.semi-conductor.nl/ Links to Semiconductors sites
http://members.chello.nl/e.vandervaart/ Experimental site


 
Reply With Quote
 
 
 
 
picayunish
Guest
Posts: n/a
 
      10-19-2003
brucie wrote in news:bmusmg$rac7a$:
> In post <ReCkb.796$2o2.15876@amstwist00>
> picayunish said...
>
>>> http://usenet.alt-html.org/styles/cs...ger-thingy.php

>
>> I noticed in a style sheet (e.g. style04.css) the following string
>> *{color:black;background-color:#FFC066;}
>> Why using the * and not e.g. body
>> {color:black;background-color:#FFC066;} ?

>
> i'm just in the habit of always starting my css with '*' for common
> stuff. the file is just a demo, stop picking on me. <sob/>


| That's it !
I go to my trailer ! |
--
Edwin van der Vaart
http://www.semi-conductor.nl/ Links to Semiconductors sites
http://members.chello.nl/e.vandervaart/ Experimental site


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Training Institute In Delhi, Live Projects on PHP. Short TermPHP Courses, PHP Scripts, PHP Training with Live Projects. Rajive Narain Java 0 09-18-2009 10:47 AM
Content Page specific style style sheet rshillington@gmail.com ASP .Net 0 07-14-2006 03:45 PM
Firefox screwing with my style sheet margins! Bill Firefox 14 11-18-2005 03:30 PM
Need help with Style conversion from Style object to Style key/value collection. Ken Varn ASP .Net Building Controls 0 04-26-2004 07:06 PM
Adding style sheet dynamicaly Marc Nederhoff ASP .Net 2 11-05-2003 04:56 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57