Re: checking for IE or netscape so I can put out the right style sheet
| From: | Rouvas Stathis | Date: | Tue, 07 Nov 2000 22:04:09 +0000 |
| Subject: | Re: checking for IE or netscape so I can put out the right style sheet | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-24204@lists.php.net to get a copy of this message | ||
or you can grab the javascript solution Netscape is offering from
developer.netscape.com
I think the URL is :
<http://developer.netscape.com/docs/examples/javascript/browser_type.html>
It is not server-side so may be it's not what you want, but I figure
that since it comes from the mothership it ought to rock. Anyway, the
whole issue is purely client-side so I think it's best done at the
client.
-Stathis.
Toby Miller wrote:
>
> You can try this. It's essentially the same code that I'm currently using
> for our new site. It adjusts the font sizes for both browsers (IE and
> Netscape) on PC, Mac, and Linux. I'm using the ClientSniffer from
> http://phpclasses.upperdesign.com (it's a pretty good
> sniffer). Hope this
> saves you some headaches.
>
> The zip file contains:
> - ClientSniffer.class.php
> - fontAdjust.php
> - global.inc.php
> - style.inc.php
>
> Toby
>
> ----- Original Message -----
> From: "WEBberater (Jochen Kδchelin)" <jk@wa-p.de>
> To: <ozbcoz@optushome.com.au>
> Cc: "PHP GENERAL LIST" <php-general@lists.php.net>
> Sent: Tuesday, November 07, 2000 3:19 PM
> Subject: RE: [PHP] checking for IE or netscape so I can put out the right
> style sheet
>
> > try this:
> >
> >
> > $browser = getenv("HTTP_USER_AGENT");
> > echo $browser;
> >
> > > -----Original Message-----
> > > From: Jim Carey [mailto:ozbcoz@optushome.com.au]
> > > Sent: Tuesday, November 07, 2000 9:16 PM
> > > To: PHP GENERAL LIST
> > > Subject: [PHP] checking for IE or netscape so I can put out the right
> > > style sheet
> > >
> > >
> > > I've found that fonts from my page appear smaller on Netscape
> > > than IE - so I
> > > would like to test for IE or Netscape and put out the right Link
> statement
> > > depending upon which browser - sort of:
> > >
> > > if ($browser == "IE)
> > > {
> > > echo "<LINK REL=Stylesheet HREF="/css/genIE.css"
> > > TYPE="text/css"
> > > MEDIA=screen>\n";
> > > }
> > > else
> > > {
> > > echo "<LINK REL=Stylesheet HREF="/css/genNS.css"
> > > TYPE="text/css"
> > > MEDIA=screen>\n";
> > > }
> > >
> > > Anyone tell me how to set $browser depending on the actual
> > > browser in use ?
> > >
> > > Jim Carey
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> > > For additional commands, e-mail: php-general-help@lists.php.net
> > > To contact the list administrators, e-mail: php-list-admin@lists.php.net
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> > For additional commands, e-mail: php-general-help@lists.php.net
> > To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net