Nice buttons

‘Inspired’ by github, here are is some styling you can apply to links and buttons (shown here with/without hover):

HTML:

<a class="button" href="/"><span>Button</span></a>
<a class="button danger" href="/"><span>Danger Button</span></a>

CSS:

<style>
.button{
	height: 23px;
	padding: 0px 10px;
	line-height: 23px;
	font-size: 11px;
	font-weight: bold;
	color: white;
	text-shadow: -1px -1px 0 #333;
	-webkit-border-radius: 3px;
	-moz-border-radius: 3px;
	text-decoration: none;
	-webkit-text-stroke: 1px transparent;	
	height: 34px;
	padding: 0;
	position: relative;
	top: 1px;
	margin-left: 10px;
	font-family: helvetica,arial,freesans,clean,sans-serif;
	font-weight: bold;
	font-size: 12px;
	color:#637DB0;
	text-shadow: 1px 1px 0 white;
	white-space: nowrap;
	border: none;
	overflow: visible;
	background: #DDD;
	filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#ffffff',endColorstr='#e1e1e1');
	background: -webkit-gradient(linear,0% 0,0% 100%,from(white),to(#E1E1E1));
	background: -moz-linear-gradient(-90deg,white,#E1E1E1);
	border-bottom: 1px solid #EBEBEB;
	-webkit-border-radius: 4px;
	-moz-border-radius: 4px;
	border-radius: 4px;
	-webkit-box-shadow: 0 1px 4px rgba(0,0,0,0.3);
	-moz-box-shadow: 0 1px 4px rgba(0,0,0,0.3);
	box-shadow: 0 1px 4px rgba(0,0,0,0.3);
	cursor: pointer;
	-webkit-font-smoothing: subpixel-antialiased!important;
	display: inline-block;
}

.button:hover {
	background-position: 0 -23px;
	text-decoration: none;
	color:#FFF;
	filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#81a8ce',endColorstr='#5e87b0');
	background: -webkit-gradient(linear,0% 0,0% 100%,from(#81a8ce),to(#5e87b0));
	background: -moz-linear-gradient(-90deg,#81a8ce,#5e87b0);
	text-shadow: 1px 1px 0 #333;
	border-bottom: 1px solid #5e87b0;
}

.button.danger, a.button.danger {
	color: #900;
}

.button.classy:hover:visited{
	color:#FFF;
}

.button.danger:hover{
	filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#ce8181',endColorstr='#aa0000');
	background: -webkit-gradient(linear,0% 0,0% 100%,from(#ce8181),to(#a00));
	background: -moz-linear-gradient(-90deg,#ce8181,#a00);
	color:white;
	text-shadow: 1px 1px 0 #333;
	border-bottom: 1px solid #a00;
}



.button span, a.button span {
	display: inline;
	height: 34px;
	padding: 0 13px;
	line-height: 36px;
}

input.button
{
    padding-left:15px;    
    padding-right:15px;   
}

</style>
Advertisements