I have been out shinyed

John All­sopp has just had pub­lished Shiny Happy But­tons on 24 Ways, and John has out shinyed my but­tons using CSS3 for pro­gress­ive enhance­ment at Web Mixed Grill.

>

shiny button as see in webkit nightly build

If you are using a nightly web­kit build you will see on the left CSS3 but­ton with a back­ground gradi­ent, which was done without images. Every­body else will have to look at the image on the right.

What John did better

  • Used CSS gradi­ents which is cur­rently only sup­por­ted by web­kit nightly builds at the moment. David Hyatt’s Intro­du­cing CSS Gradi­ents has the details.
  • Used only one ele­ment, instead of the three I used. One of the extra divs I used was for an extra bor­der, because no browser sup­ports mul­tiple bor­ders, yet. The other div I used was for the trans­par­ent over­lay, which could be rep­lic­ated by mul­tiple CSS gradi­ents and over­lay­ing a radial gradi­ent on a lin­ear gradient.
  • Used the but­ton ele­ment instead of a div. I made a per­sonal choice to avoid using a but­ton ele­ment, because it is not sup­por­ted by XHTML-MP 1.2 and there­fore a couple of major mobile browsers (like IE for Win­dows Mobile 6).

Same Mistakes

  • Both me and John used border-radius and box-shadow which causes prob­lems with the cur­rent ver­sion of Chrome

Where Next?

Time to start look­ing fur­ther at CSS gradi­ents, both radial and lin­ear and to look at imple­ment­ing mul­tiple gradi­ents. To get the back­ground effect I want.

I will look cut­ting down the num­ber of ele­ments and think about using a but­ton ele­ment instead of a div and anchor for my next example, which I am about to start work­ing on.

3 Responses to “I have been out shinyed”

  1. Gary Barber Says:

    Using a but­ton doesn’t mean john is right, just that he’s not con­sid­er­ing the com­plete pic­ture. I can under­stand why he used gradi­ents they are very sexy.

  2. Nick Says:

    Gary it was not John is right I am wrong. It was more maybe I should recon­sider my blanket ban on the but­ton ele­ment. Not work­ing in IE for Win­dows Mobile, Blazer and other mobile browsers vs being semantic­ally cor­rect, styleable in Safari for Mac and works well in com­puter browers.

    If you use any­thing more than very simple JavaS­cript you might as well use a but­ton. Because IE for WM6 is likely to die on the JavaScript.

  3. Ann @Ann Arbor Michigan Website Promotion Says:

    Hey Nick I’m sure you’ll come up with some­thing bet­ter. In any case most people are mov­ing from IE to fire­fox and chrome.

Affiliates

Google
text advertising by
Powered by Reseller Zoom