[thelist] if this then this in php

sasha spam at bittersweet2.com
Mon Jan 6 11:50:00 CST 2003


On Mon, 6 Jan 2003 12:30:16 -0500, Adam <swerve90 at sympatico.ca> wrote:

> --
> [ Picked text/plain from multipart/alternative ]
> Hi all. Having probs trying to serve Win IE5.0 an inline css id. All
> other browsers perform accepatbly, 5.0 is my only problem.
>
> <!--#if expr="$HTTP_USER_AGENT = /MSIE [45]/" -->
> <div id="one">
> <!--#elif expr="$HTTP_USER_AGENT = /Mozilla\/[56]/" -->
> <div id="two">
> <!--#else -->
> <div id="two">
> <!--#endif -->
>
> Something like the above only just for IE5.0 not 5.5, 6+ and in php. Can
> anyone offer some guidance? I've been having this problem for sometime
> now and tried in my php n00b way to fix it but no luck. Any help would be
> greatly appreciated
>
> Adam Leon
> Pupilchoke Design
> http://www.pupilchoke.com
> http://www.tonguesnthumbs.net
> --
>

And why exactly is it that IE 5 can't be served the same CSS information as
5.5+?  There may be another work around available that doesn't require
searching the user agent strings (which can be faked anyway, such as
Opera's id as IE).  I use #id to give IE specific information, then replace
it with html>body #id to give every other browser the information they need
(this works best in Transitional, though).

But, if your heart is set on capturing 5.0x specifically...

MSIE 5.[0-4]{1}[0-9]*

You might find this helpful:
http://www.pgts.com.au/pgtsj/pgtsj0208c.html

--
sasha



More information about the thelist mailing list