CSS3 buttons and sprites


I have built a css3 button but want to replicate its exact dimensions in Photoshop to create a sprite for IE. What is the best method for doing so?

Here is the code:

.button{background-image:-moz-linear-gradient(top,#6b7886,#3b4f63 50%); background- 
image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#6b7886),color-stop
(1,#3b4f63)); padding:5px 15px; color: white; font-size:1.2em; font-weight: normal !  
important; text-decoration:none; text-transform:uppercase; border:3px double #647484 
!important;border-top: 1px solid #c3d6df; -moz-box-shadow:1px 1px 3px #666; -webkit-  
box-shadow:1px 1px 3px #666; border-radius: 5px; box-shadow:1px 1px 3px #666;}

.button:hover{background-image:none; background-color:#6b7886; 
-moz-box-shadow:0px 0px 2px #999; -webkit-box-shadow:0px 0px 2px #999; 
box-shadow:0px  0px 2px #999; text-decoration:none !important;}


I think it’s not a great solution printing the screen!
How about try to create a imageless button with compatible code for (poor) IE ?
I’ve used this for buttons creation and this for cross browsers gradient!
Using together I think that works!

Answered By – Leonardo Gandini

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published