•  
      CommentAuthorSpode
    • CommentTimeJan 21st 2008 edited
     

    If you've ever done any web development, you'll know that getting cross-browser rendering identical can be a complete pain, as can getting Javascript code to work on every browser. Generally, coding for FireFox is a dream, as it tends to comply to all the standards and works as you expect. This isn't always the case, but it's certainly miles ahead of IE.

    Internet Explorer just seems to break all the rules and causes me more stress that anything else I can think of. IE7 has got better, but there are still a hell of a lot of people using IE6.

    While over at hackszine.com this morning, I came across IE7-js, that claims to solve this problem once and for all.

    IE7-js

    IE7 is a JavaScript library to make Microsoft Internet Explorer behave like a standards-compliant browser. It fixes many HTML and CSS issues and makes transparent PNG work correctly under IE5 and IE6.

    The list of fixes is really quite impressive and is something I'm certainly going to have a look at in the near future.

    As impressive as this is, it just highlights Microsoft's incompetence (prove me wrong MS!), in that such a fix needs to be created in the first place. In the meantime, I think Futurama's Fry speaks for everyone by issuing the following statement:

    •  
      CommentAuthorEyes Open
    • CommentTimeJan 21st 2008
     

    Thanks for the heads up Spode.

    Microsoft seem to manage to ruin everything and I'm hoping their inevitable demise in the wake of open source will be quick.

    •  
      CommentAuthorSpode
    • CommentTimeJan 21st 2008
     

    I'm certainly not a Microsoft basher, but it is truly frustrating to work with!

    • CommentAuthorBeanz
    • CommentTimeJan 21st 2008
     

    I have to say, for CSS working with IE 6+7, the "underscore fix" is rather useful.

    In the CSS standard, the underscore is a valid character, so "_width: 150px;" is valid CSS.
    In all non-IE browsers they don't recognise this, and thus ignore it, but IE recognises it and removes the underscore.
    If you therefore put

    width: xxxpx; _width: yyypx;

    All good browsers will take the xxx value, and IE will take the yyy value.

    This works with any declaration, not just width!

    •  
      CommentAuthorSpode
    • CommentTimeJan 21st 2008
     

    That's a really useful tip! Does that work with IE7 too?

    • CommentAuthorBeanz
    • CommentTimeJan 21st 2008 edited
     

    I believe so :) although, since it handles CSS differently some other tweaks might be needed somehow :| (javascript maybe?)

    There are other ways of having IE only CSS.
    e.g.:

    <link rel="stylesheet" href="/style/global.css" type="text/css" media="all" charset="utf-8" /> <!--[if IE 6]> <link rel="stylesheet" href="/style/ie6.css" type="text/css" media="all" charset="utf-8" /> <![endif]--> <!--[if IE 7]> <link rel="stylesheet" href="/style/ie7.css" type="text/css" media="all" charset="utf-8" /> <![endif]-->

    They do this on bit-tech, which works well.

 
Copyright Andrew Miller (Spode), 2008