Custom Buttons

An implicit styling of the BUTTON element complete with example HTML, CSS and sprite image.

Custom Buttons

Introduction

These custom styled buttons are made as a fork from the great work of Derek DeVries and his, truly beautiful, custom styled cross browser buttons. In this version, all button elements will implicitly and easily be styled using CSS and a background PNG.

Download

There are currently no directly downloadable artifacts for this project - instead, you can get the source code directly from the repository at the link below:

http://github.com/olle/custom_buttons

Documentation

This variant wil implicitly style any button element (with an inner sliding-doors span). This way there is no required button-class for styling and the HTML can stay thin and free from extra elements.

The buttons use a sprite-based background image for button graphics.

Some button skins, or extensions, breaks up into optional extra CSS and image files. These files are organized in the following way:

Three required files for default Custom Buttons (Implicit):

  
     css/
         button.css
         ie-button.css
     
     img/
         button.png

Theese three files will give the nice rounded look that Derek made. If you want to add styles or "skins" you need to add pairs of skin files. Don't forget to include the stylesheet on your HTML-page.

The skin files are named like this:

     css/button-.css
     img/button-.png

References

Below are som links to resourcs that describe more about styling button elements.

Demo

Below is an iframed example page with all the button styles that are part of the downloadable source code package.

blog comments powered by Disqus

Fork me on GitHub