CSS Library: Links & Buttons: Here
CSS Square buttons
Author: Dynamic Drive
These buttons use the sliding doors technique of CSS, plus two sliced background images with "on" and "off" states, to create flexible glossy looking CSS buttons. Each button can accommodate text of variable widths and supports a hover effect when the mouse rolls over it. The only limitation is the height of the button, which is fixed based on the background image's height.
For your convenience, we've created 5 different colored square buttons to get you on your way!
Demo:
The images used: Choose the desired set to download (2 images total):
Gray squares (2 images):
Green squares (2 images):
Orange squares (2 images):
Blue squares (2 images):
Red squares (2images):
The CSS:
Got a question or need help customizing this CSS code? Post it in the CSS Forums. If you have a comment or suggestion instead, post it in the comments section below.
Comment Pages 1 of 4 pages 1 2 3 > Last »
Nice tutorial on css button.
But this button as an limitation meaning it could not be expandable.
If have button "Save" then this get fit into it,
but if the button text expand into some bigger sentence
or with 2 to 3 words then this button have effect, so css will not be displayed properly.
I mean middle portion will have blank background.
.buttonwrapper{ /* Container you can use to surround a CSS button to clear float */
overflow: hidden; /*See: http://www.quirksmode.org/css/clearing.html */
width: 100%;
}
does not make any sense. {width} should be determined automatically/dynamically based on {link text length},

