Providing PHP Programming Services to Design Professionals

Interested in Electronics?

Check out James' Embedded AVR/Arduino Development, and New Zealand Electronic Component Store

Conditional Comments 

A little known feature of Internet Explorer is "Conditional Comments", these are special html comments which allow you to provide part of your page that will only be usable in certain versions of Internet Explorer.

This feature was introduced with version 5 of the browser and as such it really comes in useful when you're trying to make some CSS work with the major browsers as you can easily provide special "non-fancy" CSS to Internet Explorer only.

I won't go into detail as Microsoft already have the full documentation on conditional comments, but here is how you can provide some CSS to Internet Explorer 5 and above.

<!--[if gte IE 5]>
<style type="text/css">
/* Put Special IE 5+ styles in here */

Of course you can put anything you like between the comments (except other comments I'd imagine), in this case I've put a CSS style definition, you could put javascript, or even plain old HTML if you so desire.

The only thing this won't help you with is if you still need/want to lend a helping hand to Internet Explorer versions older than 5, they don't understand conditional comments and like all other browsers will totally ignore everything inside them.

It could be argued however that if a user is using Internet Explorer older than 5 thier ride is going to be bumpy anyway - if you've written your CSS carefully they should at least be able to use your site, that's the theory at least.