CSS Sprite / Sliding Doors Button

Pretty simple CSS Sprite / Sliding Doors Button tutorial

HTML

So Neat!

CSS

a.GlobalOrangeButton span {
background: transparent url(’images/button_left_orange.png’) no-repeat 0 0;
display: block;
line-height: 22px;
padding: 7px 0 5px 18px;
color: #fff;
}

a.GlobalOrangeButton {
background: transparent url(’images/button_right_orange.png’) no-repeat top right;
display: block;
float: left;
height: 34px;
margin-right: 6px;
padding-right: 20px;
text-decoration: none;
font-family: Arial, Helvetica, sans-serif;
font-size:12px;
font-weight:bold;
}

a.GlobalOrangeButton:hover span {
background-position: 0 -34px; color: #fff;
}

a.GlobalOrangeButton:hover {
background-position: right -34px;
}

One Response to “CSS Sprite / Sliding Doors Button”

written on 3 February 2010 -

Love it :)

Leave a Comment