[thelist] PHP multiple style switcher

Jeffrey Barke jeffrey.barke at themechanism.com
Fri Nov 23 15:17:43 CST 2007


 > As you can see in the source , I am using different
 > styles. One (safari.css) for Safari, the other one for IE7 and Other
 > browsers called other.css and the last one is ie6.css
 > which I am using it for IE6.

Still no need for browser detection.

<?php
	switch ($_GET['style']) {
		case 'hicontrast':
?>
<link rel="stylesheet" type="text/css" media="screen" href="hiC.css" />
<!--[if lte IE 6]>
<link href="css/hiCIE6.css" rel="stylesheet" type="text/css"  
media="screen" />
<![endif]-->
<?php
		break;
		default:
?>
<link rel="stylesheet" type="text/css" media="screen"  
href="screen.css" />
<!--[if lte IE 6]>
<link href="css/IE6.css" rel="stylesheet" type="text/css"  
media="screen" />
<![endif]-->
<?php
		break;
}
?>
<link rel="stylesheet" type="text/css" media="print" href="print.css" />

Jeffrey

--
Cheers.
Jeffrey Barke
jeffrey.barke at theMechanism.com
Lead Developer, US
theMechanism - New York City
440 9th Avenue, 8th Floor
New York, NY 10001-1631
t: +1 212.404.3150
c: +1 917.941.1232
f: +1 212.404.3228



http://www.theMechanism.com

Subscribe to theMechcast, our monthly Podcast:
http://feeds.feedburner.com/theMechcast

theMechanism - London
3rd Floor
405 The Strand
London E14 9FW
United Kingdom
t: +44 (0)20 7240 4964
f: +44 (0)20 7240 2262

--
The information contained in this Electronic mail message is attorney  
privileged and confidential information intended only for the use of  
the individual or entity named above. Such information also is  
intended to be privileged, confidential, and exempt from disclosure  
under applicable law. If the reader of this message is not the  
intended recipient or the employee or agent responsible to deliver it  
to the intended recipient, you are hereby notified that any  
dissemination, distribution, or copying of this communication is  
strictly prohibited. If you have received this communication in  
error, please notify us immediately by telephone.

Blah, blah, blah...
--


On Nov 23, 2007, at 3:04 PM, DAVOUD TOHIDY wrote:

>
>> on Date: Fri, 23 Nov 2007 14:35:20 -0500 Jeffrey Barke wrote:>but  
>> I still fail to understand *why*
>> this would have anything to do with the browser. Are you talking
>> about multiple style sheets that express different styles or multiple
>> style sheets that address browser inconsistencies.
>
> o.k could you please visit my portfolio at
> http://cssfreelancer.awardspace.com .
>
> As you can see in the source , I am using different
> styles. One (safari.css) for Safari, the other one for IE7 and Other
> browsers called other.css and the last one is ie6.css
> which I am using it for IE6.
>
> I am planning to have some other styles for each browser, so
> yes I am talking about multiple style sheets that express different
> styles for a specific browser. So I am planning to detect the browser
> , load the proper default css and provide opportunity for user
> to switch to another css file based on different browser and
> different styles.
>
>> If the former, there is no need to detect the browser server side.
>
> yes that is correct but why not? and if browser detection is going
> to happen client side like the one that I have in my portfolio:
>
> 1-what if somebody has disabled Javascript
> 2-is there any browser detection method which does not
> involve javascript in client side? other than what I have in
> my portfolio which partially uses javascript?
> _________________________________________________________________
> Express yourself with free Messenger emoticons. Get them today!
> http://www.freemessengeremoticons.ca/?icid=EMENCA122
> -- 
>
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !




More information about the thelist mailing list