I'm trying to create a CSS3 button which includes an image using multiple background. I want to use the same basic style (based on Twitter's BootStrap CSS framework), but apply a different image by adding a class.
I want a gradient as the base, then to add an image by tagging on an extra class. I can do this for one button by extending the btn
css class in bootstrap like this:
.btn.btnEdit
{
padding-left: 25px;
background-color: #e6e6e6;
background-repeat: no-repeat, no-repeat;
background-position: 5px center, center center;
background-image: url(/images/edit_16.png), -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));
background-image: url(/images/edit_16.png), -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
background-image: url(/images/edit_16.png), -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);
background-image: url(/images/edit_16.png), -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
background-image: url(/images/edit_16.png), -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
background-image: url(/images/edit_16.png), linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
}
.btn.btnEdit:hover {
background-position: 5px center, 0 -15px;
}
But ideally I'd like to remove boilerplate CSS and just specify the extra background again (just background-image: url(/images/edit_16.png), linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
or something similar). Is there a way I can specify additional backgrounds by cascading?
This is ASP.NET so I can't use sliding doors without a control adapter, which I don't want.