article

Monday, January 17, 2011

CSS - Create a Button with Hover

CSS - Create a Button with Hover

The CSS Code
a.button {
background: url(../images/button.png) no-repeat 0 0;
width: 186px;
height: 52px;
display: block;
text-indent: -9999px;
}
Hover State CSS
a.button:hover { background-position: 0 -52px; }
Click State CSS
a.button:active { background-position: 0 -104px; }

Related Post