XHTML & CSS
Fun with hot dogs!
Check this out:
If you're using any modern browser (that rules out IE6 and IE7), you should
see a picture of a hot dog above.
But no such image file exists on my server—or on any other server. You're looking at a PNG image, but there's no PNG file anywhere.
How is that possible?
Right-click on the hot dog and view the image properties—in particular, note the image's src. You'll see a URI that begins with data:, followed by a very long string of gibberish.
Conditional comments for iPhone
You're probably familiar with IE's conditional comments. They allow us to feed special code to that special browser to overcome its many bugs and deficiencies.
Is there something similar for iPhone? Not exactly, but we can achieve the same end:
<!--[if !IE]><!--> <link media="only screen and (max-device-width: 480px)" href="iphone.css" type="text/css" rel="stylesheet" /> <!--<![endif]-->
Forms in HTML5
The HTML5 spec continues to grind inexorably toward publication. I've just spent a while with the latest draft, and at least with respect to forms, I like what I see. Here's a roundup.
Toward Better Buttons
I see this a lot:
<input type="submit" class="button" value="Save Changes" />Because the <input /> element can represent many things other than a button—and because many browsers still don't support attribute selectors, such as input[type=button]—the author has added class="button" for the sole purpose of giving the stylesheet something to match on.
May I suggest a better way?