What am I doing bad?
CSS:
.submit{
padding-left:10px;
margin:0;
border:0;
outline: 0;
height:32px;
padding-right:32px;
}
.green-btn {
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#61A801), to(#8CC400));
background: -webkit-linear-gradient(top, #8CC400, #61A801);
background: -moz-linear-gradient(top, #8CC400, #61A801);
background: -ms-linear-gradient(top, #8CC400, #61A801);
background: -o-linear-gradient(top, #8CC400, #61A801);
color: #fff;
font-family: verdana;
font-size: 13px;
font-weight: normal;
border-radius:5px;
}
.clipboard{
background-image: url(http://cdn1.iconfinder.com/data/icons/opensourceicons/32/Scissors.png) no-repeat right center;
}
HTML:
<input type="submit" value="Copy" class="submit green-btn clipboard">
JSFiddle: http://jsfiddle.net/77NYA/
You cannot specify the position and repeat values inside the
background-imageproperty. You can only specify the URL to the image. You’ll have to separate them out like this:Also note: Some browsers (I don’t know which ones) don’t allow gradients and background images to be combined together.
Here’s an alternate solution using a
<button>with an<img>inside it:And the jsFiddle preview. Feel free to play with the margins and stuff to make it look more how you want.