Archive for August, 2008

Snipping Tool – A Vista Enhancement for Developers

Saw a great post about the Snipping tool in Vista: The Blog at the End of the Universe : Why Vista? (Volume 4 — Snipping Tool). For an old-time Alt+Print Screen guy, this thing is great. But the first time I looked for it, it wasn’t there (I’m using Vista Business). I guess by default it isn’t always installed, but it is available, there is an article describing how to activate the Snipping Tool at PCWorld.

Posted on:
Posted in Tools | Comments Off on Snipping Tool – A Vista Enhancement for Developers

A Cool IE HTML/CSS Trick – Conditional Comments

I am continually humbled by the amount of stuff I don’t know in the areas where I generally feel good about my level of knowledge….

Today I learned about conditional comments. This is an IE specific trick, but in my case I’m trying to have different CSS for a certain class so it behaves properly in IE6 and standards compliant browsers. The problem is using .png files that have transparency. IE6 totally botches .png files. But it turns out there is an IE-specific filter (progid:DXImageTransform) that causes IE6 to render a .png properly. An older article at A List Apart describes how to use it, along with conditional comments.

Conditional comments allow IE to display the content between the comments based on an expression. In this case, the expression is testing for the browser version:

<!–[if IE 6]>
<link  rel=”stylesheet” type=”text/css”   href=”ie6.css” />

So this code snipped would cause IE 6 to load this custom stylesheet. IE7 interprets the comment correctly and doesn’t load the stylesheet. Other browsers interpret this as a comment and ignore it. Very nice.

Posted on:
Posted in ASP.NET | Comments Off on A Cool IE HTML/CSS Trick – Conditional Comments