Re: checking for IE or netscape so I can put out the right style sheet
| From: | Toby Miller | Date: | Tue, 07 Nov 2000 22:41:28 +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-24217@lists.php.net to get a copy of this message | ||
Sorry, I think I forgot the attachment :\
----- Original Message -----
From: "Toby Miller" <tmiller@creativegeneration.com>
To: <jk@wa-p.de>; <ozbcoz@optushome.com.au>
Cc: "PHP GENERAL LIST" <php-general@lists.php.net>
Sent: Tuesday, November 07, 2000 3:49 PM
Subject: Re: [PHP] checking for IE or netscape so I can put out the right
style sheet
> 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
Attachment: [application/x-zip-compressed] fontAdjust.zip
Attachment: [application/x-zip-compressed] fontAdjust.zip