Dylan Greene dot com

May contain nuts.

Using CSS for the XML Button - follow up

February 26, 2003 8:36 AM

You'll have to excuse my excitment, I've been on the Internet for a while now, but never as a blogger.

http://www.scripting.com:

Dylan Greene did the button in CSS, which is precisely as politically correct as the PNG version.

http://zajac.ca/xmlbutton:

This code is based on Dylan Greene’s CSS XML button. It is slightly optimized to reduce the size of the code to 205 bytes. If you use more than one orange button on your web site, you could reduce the total bytage by using a class attribute and tucking the CSS away in your site style sheet.

http://www.dotnetweblogs.com:

This is great! Surprised no one thought of this sooner.
Also see his site for how to reuse the CSS by putting it in your stylesheet.

And there's always somebody that doesn't like the idea:

http://gammatron.novarese.net:

This reminds me of the wankers who re-did their table-based calendars in CSS. Calendars are exactly what HTML tables were intended for, rendering them with CSS is overly complicated and less functional. I'm not sure what the point of rendering a button in CSS is, besides the obvious trendiness of saying "I implemented this with CSS." If this person could render the coffee cup in CSS I might be impressed.

Comments

Isn't this the same as jwz's rss css replacement posted on 2002-10-21 00:10

http://www.livejournal.com/talkread.bml?journal=lj_nifty&itemid=57340&thread=1095420#t1095420

I don't think it's a *bad* idea (after all, you did save 22 bytes), I just don't think it's particularly practical. With the PNG, you don't have to worry about various browsers' standards-compliance or rendering quirks. You could make a case for the text version having better accessibility, but ALT tags should be more than enough for something this small.

Don't get me wrong, it's an interesting proof-of-concept, and useful as an exercise. It's in the same vein as the "wankery" I referred to, but obviously doesn't take itself as seriously as those insane CSS calendars that popped up during a period when CSS-fever was sweeping weblogs, and people rooted out all traces of tables on general principles without thinking first.

I think it's a cool hack. Even put it on my site.

Very simple, very functional, slightly decieving in a benign way.

Thanks.

the benefit of this is it allows people to search for "xml" with the find feature of the browser to find the feed of a page more easily than if it was hidden in an image.

rock on.

you use more than one orange button on your web site, you could reduce the total bytage by using a class attribute and tucking the CSS away in your site style sheet.

Your Comments
Name:
Email address (optional):
Home page, blog, or journal (optional):
Comments:

Related Posts

Category: CSS
Category: RSS
Category: Ideas