Search code examples
cssformshtmlcufon

Is it possible to get Cufon to work on a button?


So right now I'm bashing my head - at the moment we use an element for a button to give it our own custom font, fine - this works, but as we're using Cufon on the rest of the site, we're wondering if it's possible to get Cufon working on a button.

So far I've changed the button to an and using standard css styles on an 'input' or 'input[type="submit"]' element work fine - but I've tried both of these in cufon to no avail.

This is a button - so as Cufon generates images, this should work, but maybe I'm doing it wrong - can anyone help?


Solution

  • Using the element in the following way:

    <button type="buton">value</button>
    

    worked when applying the Cufon style:

    Cufon.replace('button', {color: '-linear-gradient(#999, 0.45=#666, 0.45=#555, #999)'});
    

    Thanks very much :)