It seems to me that you're asking us to debug your code. If you're
using PHP I assume you're a programmer , therefore you understand where
the problems more certainly lies (if you're not, then ask the guy who
did the script, you shouldn't mess with it) ---not everyone of us is
meant to be a programmer or a designer.
So... your issue is not CSS-related, so please make sure to send
your inquiries to the right people. As a hint: check what do you see on
each browser when you visit http://www.cpmac.com/indexcss.php (this is
the CSS code that that browser is seeing).
Rafael.
Colin Mcgarry wrote:
> I've just set up Opera to see how it deals with my web pages. I was
> surprised to see my home page has no css with Opera.
> the page is http://www.cpmac.com and the css is a php file that begins
>
>
> <?php
> header("Content-type: text/css");
> $d = detect();
> $b = $d['browser'];
> $v = $d['version'];
> $o = $d['os'];
> function detect()
> {
> $browser = array ("IE","OPERA","MOZILLA","NETSCAPE","FIREFOX","SAFARI");
> $os = array ("WIN","MAC");
> $info['browser'] = "OTHER";
> $info['os'] = "OTHER";
> foreach ($browser as $parent)
> {
> $s = strpos(strtoupper($_SERVER['HTTP_USER_AGENT']), $parent);
> $f = $s + strlen($parent);
> $version = substr($_SERVER['HTTP_USER_AGENT'], $f, 5);
> $version = preg_replace('/[^0-9,.]/','',$version);
> if ($s)
> {
> $info['browser'] = $parent;
> $info['version'] = $version;
> }
> }
> foreach ($os as $val)
> {
> if (eregi($val,strtoupper($_SERVER['HTTP_USER_AGENT'])))
> $info['os'] = $val;
> }
> return $info;
> }
>
> ?>
>
> <?php if ($b != "OTHER" && $o != "OTHER" && $d >= 5) { ?>
>
> /* BEGIN CSS RENDERING */
>
>
> <?php
> echo ($b =="OPERA") ? null : ".opera { display: none; }\n";
> echo ($b =="IE") ? null : ".ie { display: none; }\n";
> echo ($b =="FIREFOX") ? null : ".firefox { display: none; }\n";
> echo ($b =="MOZILLA") ? null : ".mozilla { display: none; }\n";
> echo ($b =="NETSCAPE") ? null : ".netscape { display: none; }\n";
> echo ($b =="SAFARI") ? null : ".safari { display: none; }\n";
> ?>
>
>
> followed by css styles
>
>
>
> Firefox and even IE7 treat it identically but Opera sees nothing.
>
> If I change the style sheet to a css file it works OK.
>
>
>
> ______________________________________________________________________
> css-discuss [EMAIL PROTECTED]
> http://www.css-discuss.org/mailman/listinfo/css-d
> List wiki/FAQ -- http://css-discuss.incutio.com/
> List policies -- http://css-discuss.org/policies.html
> Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
>
>
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/