There are some alternatives. * IE Conditional Comments * Client-side conditionals (Javascript) * Server-side conditionals (php,cf,python,others)
If you ask me, i would choose the server side way ;) Regards, On 4/7/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
On Apr 6, 4:57 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] schrieb: > > > > > There is an easier way that is not jQuery-or-Javascript-dependent, > > since mostly we just want to know is the browser IE or not. Use > > conditional comments around the BODY tag. Seehttp://www.puidokas.com/updating-my-css-for-ie7/ > > . I use : > > <!-- Old Internet Explorer --> > > <!--[if lt IE 7]> > > <body class="IE IElt7"> > > <![endif]--> > > <!-- New Internet Explorer --> > > <!--[if gte IE 7]> > > <body class="IE"> > > <![endif]--> > > <!-- Any other browser --> > > <!--[if !IE]>--> > > <body class="notIE" > > > <!--<![endif]--> > > > Danny Wachsstock > > To me this looks really ugly. Why not simply: > > <!--[if lt IE 7]> > <link rel="stylesheet" href="ie.css" type="text/css"> > <![endif]--> > > -- Klaus Oh, it's ugly all right. So much that IE forces us to do is ugly :) However, if you're going to use BODY classes, it's probably a better way than using javascript to detect browsers. Danny
-- Joan Piedra || Frontend webdeveloper http://joanpiedra.com/