ailon's DevBlog: Development related stuff in my life

No-CSS fallback for IE5.5 and earlier

5/30/2008 10:43:22 AM

I'm working on a project where I have to support modern versions of Firefox, Opera, Safari and IE6 and higher (hell I wish MS forced upgrade to IE7 through Windows Update) which is standard approach these days. Today I downloaded the excellent IETester and out of curiosity decided to look at how my project looks in IE5.5.

As expected it was a total mess. I have no plans nor requirements to support IE5.5 but I decided to do one simple thing: just skip the CSS file in IE5.5 and earlier so the site looks like it's 1995 but consistent and it's useable.

I've used conditional comments like this

    <![if gte IE 6]> 
    <link href="style.css" rel="stylesheet" type="text/css" />
    <![endif]> 
kick it on DotNetKicks.com

Tags: ,

Naming HTML Objects: Use Some Imagination

5/16/2008 9:48:47 AM

While answering questions about strange issues with SPAW Editor I notice that people often give name/id to their html objects like "body" or "text" or something like this. And this works for them until they try doing some manipulations with these objects using JavaScript. And then crazy things happen randomly.

I don't know if this is officially forbidden somewhere. But it's always a good idea to think twice every time you get an urge to name your textarea holding your post body just "body". "postBody" is only 4 keypresses longer but it will save your hours later when you sit irritated, scratching your head, trying to figure out why a simple javascript doesn't work or produces crazy side-effects.

kick it on DotNetKicks.com

Tags: ,

Copyright © 2003 - 2010 Alan Mendelevich
Powered by BlogEngine.NET 1.6.1.0