XML button created via CSS
February 25, 2003 10:42 AM
I saw on Scripting News that somebody has created a PNG version of the XML icon. Here's code to create via CSS (261 bytes) instead of a GIF (429 bytes) or PNG (283 bytes):
Now you can do neat tricks, such as a more obvious button: . No more wondering what RSS version you're about to access, and now Google and other search engines will see the words "RSS" on your web site. You can even use your browser's built-in find function to find that pesky link to the RSS.
But I have a question - Dave Winer calls the PNG version "more politically correct" than the GIF version. Is the CSS version even more PC than the PNG version?
Comments
Related Posts
Category: CSS
- Microsoft calls FoO April 22, 2005 3:44:00 AM
- Yahoo 360 invites and cool DHTML demos March 30, 2005 3:21:00 AM
- Using CSS for the XML Button - follow up February 26, 2003 8:36:50 AM
Category: XML
- XSL... what a bitch... December 2, 2003 7:47:59 PM
Category: RSS
- DABU now has OPML support September 30, 2005 3:22:00 AM
- Gnomedex is two weeks away! June 9, 2005 6:25:00 PM
- 300 people reading my feed via RSS April 22, 2005 3:35:00 AM
- I burned my RSS feed April 21, 2005 1:14:00 AM
- Tabs, RSS reader in next version of Internet Explorer? April 20, 2005 8:12:00 PM
- 29 more in RSS...
Category: Ideas
- Problems with Web 2.0, and how to fix them for Web 3.0 March 29, 2006 5:08:00 PM
- Automatic Bull-Sh*t detector extension for email, blogs, and browsers March 3, 2006 4:55:00 PM
- IE and Firefox feature request: download visible images first April 12, 2005 2:09:00 PM
- Shift-click needs more power April 12, 2005 12:25:00 AM
- Fun ways to do your taxes April 6, 2005 7:59:00 PM
- 32 more in Ideas...
Posted February 25, 2003 3:04 PM
Cool - check it out - http://scriptingnews.userland.com/backissues/2003/02/25#When:2:54:09PM - Thanks Dave!
"Dylan Greene did the button in CSS, which is precisely as politically correct as the PNG version."
Posted February 25, 2003 3:28 PM
Here's the properly-compressed PNG version - I used 'pngout' and got it down to 267 bytes:
http://tumbleweed.net/images/xml.png
Posted February 25, 2003 4:59 PM
For those who care about such things, I've tweaked the code a bit and got the CSS button down to 205 bytes: http://zajac.ca/xmlbutton
Posted February 25, 2003 7:15 PM
byte-optimising HTML is madness... any of these would fit into a packet.
Posted February 25, 2003 8:01 PM
Madness? Apparently you've never worked on a high-traffic site. Bandwidth _matters_ when you have to pay for it, not just for the person downloading the page. And if you can do something as well in text as you can in graphics, even better, because then you save another server connection for each pageload. Sweet!
Posted February 25, 2003 9:10 PM
The problem with the css approach is, unless you put the style definition in a class, you have to put the style again and again for every instance of the icon. I understand that you rarely need to do that, but if you are talking about politically corrected approach, I think the PNG version is better.
Also, imo, the PNG version simply uses too many colors. I tried reducing the color palettes to 8, and was able to make the file down to 197 bytes using GIF.
Posted February 25, 2003 9:42 PM
Well, that was just an academic exercise for me. It's interesting to discover how CSS can replace images.
On the other hand, I can envision a situation where you could replace many similar button graphics throughout a site with a linked stylesheet and a single contextual CSS selector.
Posted February 25, 2003 10:09 PM
Well, hey, if you want to play reduce the palette game, no problemo. I got the PNG down to 212 bytes by reducing to an 8 colour palette and using pngout to correctly compress it.
http://tumbleweed.net/images/xml_sm2.png
Yes, bigger than the GIF version, but also not subject to GIF licensing nonsense. :)
Posted February 25, 2003 10:14 PM
You know, it's interesting that the XML button doesn't use web-safe colours. :)
Posted February 26, 2003 6:46 AM
I found that the text is still decorated in Mozilla 1.0.1 (Linux) unless I add a style="text-decoration:none" right inside the A tag itself.
Posted February 26, 2003 9:49 AM
I played around with Antipixel styled xml buttons. After I realized I didn't want the little orange one on my pages.
http://www.rainweb.net/dev/xmlIcon.htm
Posted February 26, 2003 10:27 AM
I've added a follow up message to this one.
http://www.dylangreene.com/blog.asp?blogID=99
http://home.no.net/nothome/xml/xml_sm2.gif
Posted October 11, 2003 10:30 PM
xml_sm2.gif = 193 bytes. I use the gif animation program "Animagic" to load gif files in and then save it again. No program can beat animagic when it comes to scrink gif images without any loss of quality at all. Well it was ment to be a gif animator program but it have this nice-side effect : )
an other good gif scrinker is "SuperGIF" but that one faile when it comes to faded colors.
http://kadyellebee.com/
Posted January 8, 2004 6:14 AM
In response to Kam's comment, if you have a global stylesheet that you always include on your pages, why not put it there? Then use an xml class around the links. Voila!
I've been doing something similar - cool to see such a good response over here to it!! :)Posted January 26, 2004 3:44 AM
New buttons, any color, any size, in no time flat without ever opening Photoshop. Change your mind about the text on the button, and the button resizes itself to fit. This is perfect for all kinds of uses. Thanks, Dylan!
Posted April 3, 2004 8:29 PM
Some CSS buttons will not work in Netscape
Posted April 3, 2004 8:55 PM
I have trouble with Netscape
Posted May 25, 2004 9:20 AM
Hi Dylan,
Terrific idea you had, I'm a bit late as I searched for xml orange button on Google a few hours ago :). So I think using CSS to design XML/RSS buttons is a great idea. I thought about it because you can't search for the XML/RSS buttons using the search feature of your web browser, mine is Firefox. So I thought the only way was to use HTML + CSS. The HTML contents is the RSS plain text and CSS can easily be used to stylize it the way you want. Some people said orange was an awful colourful, maybe they're right but it's one of my favourite :). However I don't know who is the man-designer behind these buttons but I think it chose orange because it's easy to see. It's small so it's doesn't bother people, not like these annoying flash-flashy animated ads. However I think some remarks of Dave Walker were interesting as most RSS newsreaders support autodiscovery, FeedDemon does for example.
About CSS styles I think a better way that talking about bytes and styles would be to create a RSS class to stylize your buttons. The CSS file is usually cached by the web browser so it downloads it once and use it for all the other pages but I'm not sure it's that important.
All notes that replacing images with CSS styles is a bit like using vectors (SVF), you resizes it so it makes the pages more accessible. I often have to zoom the pages because designers decided to fix the fonts, bad idea, small fonts, sometimes even pixellated, shame on them :).
JM
http://minghong.blogspot.com
Posted June 16, 2004 3:03 AM
I think mine is nicer...
XHTML:
XMLorXMLCSS:
.feedButton { cursor: pointer; display: inline; background-color: #ff6600; border-top: .16em #ffc8a4 solid; border-bottom: .16em #3f1a01 solid; border-left: .16em #ff9a57 solid; border-right: .16em #7d3302 solid; padding: .04em; font-family: "Verdana", "Helvetica", "Arial", sans-serif; font-size: .75em; font-weight: bold; color: white;}.feedButton, .feedButton:link, .feedButton:visited {
color: white; text-decoration: none;}An example can be seen here:
http://www.cs.cityu.edu.hk/~martin/test-list.phphttp://minghong.blogspot.com
Posted June 16, 2004 3:06 AM
Oops... HTML is not allowed.
Well, anyway, the class can be applied to an anchor or a button...http://www.dlese.org
Posted June 26, 2004 3:28 PM
Has everyone forgotten about the <NOSCRIPT> tag? Forget which is better, use *both* and image, and CSS! Scripting browsers will save bandwidth, but all will see it the same, and the author has single-point-of-change for the CSS (scripted) part.
http://ysbeer.af.org.za
Posted January 3, 2005 11:56 AM
Thanx, this was really useful. I too prefer the simpler CSS approach to the bitmapped versions. A lot less work and an decent modern browser supports it.
http://www.trajceski.com/
Posted January 10, 2005 3:45 AM
Tsunami Relief button set
regards,
JThttp://www.gifs.eu.com
Posted May 18, 2005 6:00 PM
gifs
http://www.cssindex.com
Posted May 27, 2005 3:35 PM
Another way to create those CSS buttons can be found here: http://www.jschreiber.com/archives/2004/09/creating_pure_c.html
http://www.seo-professional.co.uk
Posted November 2, 2005 3:02 PM
Hi
Its quite interesting but could you help me out with my problem.
I want to manage a stick up footer on the website for IE 5.0 +. with CSS
As you can see 1 on bmw.co.uk
thanks
Imran Hashmi
http://www.lostseed.com
Posted November 9, 2005 10:13 AM
This is great thank you so much :)

http://www.cookiesandcandy.uni.cc
Posted November 21, 2005 12:17 PM
Posted December 5, 2005 8:58 AM
http://www.stars-nackt.eu.com
Posted January 10, 2006 9:25 AM
Posted January 27, 2006 5:57 PM
Ö
Posted March 15, 2006 10:02 AM
Posted April 18, 2006 3:32 PM
fghjfjfhj gzghhgg gzhghghghgghg gggggggggggg
Posted April 18, 2006 3:33 PM
dhhg
http://internetreklama.com/
Posted May 26, 2006 9:11 AM
Some CSS buttons will not work in Firefox
http://www.e-mago.co.il/e-magazine/intel.htm
Posted July 6, 2006 1:59 PM
right
http://www.e-mago.co.il/e-magazine/intel.htm
Posted July 6, 2006 2:06 PM
<a href="http://www.e-mago.co.il/e-magazine/intel.htm">מסכי LCD</a>
[url=http://www.e-mago.co.il/e-nagazine/intel.htm]מסכי LCD[/url]
http://www.recombinant-antibody.com/protein/
Posted September 5, 2006 3:37 AM
No more wondering what RSS version you're about to access, and now Google and other search engines will see the words "RSS" on your web site.
http://hentai-naruto.bestinop.org/
Posted October 23, 2006 4:35 PM
I found that some of the CSS buttons do not working!
http://www.designerpk.com
Posted December 9, 2006 7:58 PM
yOoo thanks.
http://www.a-spectrum.com
Posted March 15, 2007 11:34 AM
Hm What is it -?no more stupid things in this forum
http://www.hugechoiceof.com/
Posted May 7, 2007 8:25 AM
ok
http://www.expertmovie.com/
Posted May 15, 2007 5:03 PM
movie
http://www.uykucu.org
Posted August 1, 2007 3:28 PM
thanks a lot
http://www.costumefamily.com
Posted September 12, 2007 3:13 AM
runescape items runescape money sailor moon cosplay warcraft 3 cd key> dofus kamas
http://www.pornspaces.com/assfuck/
Posted September 16, 2007 3:33 PM
http://www.pornspaces.com/assfuck/
http://www.factoryfast.com.au
Posted November 27, 2007 9:23 AM
I'm still a little confused, I must admit, on what RSS is all about. Why does it matter that the search engines can pick it up? Does that improve your pagerank or something? I mean, I have an RSS feed myself, but that's about all I thought it could do. It appears that there is a heck of a lot more involved here than what I originally suspect. But what it is, I'm not entirely sure. Still, it's great to see your own blog on other's RSS feeds! Makes you feel kind of proud.
Posted November 30, 2007 9:00 AM
<a href=http://www.rs2powerleveling.com>runescapemoney</a>
<a href=http://www.rs2powerleveling.com>runescape account</a>
<a href=http://www.rs2powerleveling.com>runescape accounts</a>
Posted December 2, 2007 7:41 PM
<a href=http://www.rs2powerleveling.com>runescapemoney</a>
<a href=http://www.rs2powerleveling.com>runescape account</a>
<a href=http://www.rs2powerleveling.com>runescape accounts</a>
Posted December 2, 2007 9:23 PM
http://www.hzgames.com http://www.game-win.com
http://voegeln.123space.co.uk/
Posted December 31, 2007 11:46 AM
http://voegeln.123space.co.uk/
http://www.poppen.lenhost.info/
Posted January 5, 2008 11:06 AM
http://www.poppen.lenhost.info/
http://apparel321.info
Posted January 24, 2008 8:28 AM
It appears that there is a heck of a lot more involved here than what I originally suspect. But what it is, I'm not entirely sure. Still, it's great to see your own blog on other's RSS feeds! Makes you feel kind of proud.
http://www.portraitkingdom.com
Posted January 30, 2008 8:52 AM
Is it possible to change the color? Is it possible to customize this? I guess yes because this is just CSS right?
http://www.models.luesterne.com/
Posted February 7, 2008 4:37 PM
http://www.models.luesterne.com/
http://www.muttis.luesterne.com/
Posted February 21, 2008 3:26 PM
http://www.muttis.luesterne.com/
http://www.alemizbiz.com
Posted February 25, 2008 11:09 PM
Best regard thanks!
it is realy useble
<p><a href="http://www.alemizbiz.com" rel="nofollow">http://www.alemizbiz.com</a><br />
http://www.alemizbiz.blogspot.com
Posted February 25, 2008 11:11 PM
best regards! thanks!
http://www.alemizbiz.blogspot.com
http://www.modelssexporno.com/
Posted March 31, 2008 9:50 AM
http://www.modelssexporno.com/
http://www.frauen-brueste.net/
Posted April 2, 2008 4:20 AM
http://www.frauen-brueste.net/
Posted April 6, 2008 12:04 PM
kkk¼http://luder.yoll.net/
Posted May 6, 2008 6:47 AM
http://luder.yoll.net/
http://www.pornspaces.com/hausfrauen/