Alpha channel PNGs in IE

Gifs suck. PNGs (Portable Network Graphics) are much better – more colours, freedom from intellectual property rights, and (best of all) an alpha channel for transparency. Some good articles:

PNG opacity (with some nice examples)

Fuzzy Drop shadows (like on Google Maps)

Transparency with HTC files

And again

– Choosing what image to serve in PHP on the server

Related: Opacity in CSS, being able to see through DIVS – CSS Transparency for IE, CSS Opacity

Alpha channel PNGs in IE

Capturing Comments in HTML

A friend I work with was asking me today how to match HTML comments using regular expressions. It was an interesting example of some of the pitfalls and design that needs to go into regular expression code.

HTML comments are marked out by <!– and –>, for those who don’t know. For our examples we’ll use the code below, and change the patterns and subjects defined by $pattern and $subject respectively. This is written in PHP, but the same patterns are true for any Perl Compatible regular expression. Continue reading “Capturing Comments in HTML”

Capturing Comments in HTML