Calling separate style sheets

Permalink
Is it easy to call separate style sheets for different browsers from one php page?

I need to set up a separate style sheet for Explorer 6.

Help is greatly appreciated as Im stuck.

Nige

nige
 
ijessup replied on at Permalink Reply
ijessup
Look into the php function get_browser():http://php.net/manual/en/function.get-browser.php...

In your theme, you chould request a particular style sheet based the returned value of get_browser().

So something like:
<?php
$browser = get_browser(null, true);
if($browser['browser'] == "Internet Explorer" && $browser['version'] < 7){
// load style sheet here
} ?>


I'm not entirely sure that code will work, but do a:
<?php var_dump(get_browser(null, true)) ?>


to get the array of options.
nige replied on at Permalink Reply
nige
Cheers Ill have a look at that
nige replied on at Permalink Reply
nige
mmm could I not just use a workaround like

<!--[if IE]>
<link rel="stylesheet" type="text/css" href="ie-only.css" />
<![endif]-->

I dont (cant) do php.

Nige
Mike0051 replied on at Permalink Reply
Mike0051
Did this work for you?
Mike0051 replied on at Permalink Reply
Mike0051
Did this work for you?
Mike0051 replied on at Permalink Reply
Mike0051
Did this work for you?