If you’re looking for gradient backgrounds the following should do you well:
Here is the HTML:
<a class="first" href="http://brainlog.coryzipperle.com">First Link</a>
<a class="second" href="http://brainlog.coryzipperle.com">Second Link</a>
<a class="third" href="http://brainlog.coryzipperle.com">Third Link</a>
<a class="fourth" href="http://brainlog.coryzipperle.com">Fourth Link</a>
<a class="fifth" href="http://brainlog.coryzipperle.com">Fifth Link</a>
<a class="sixth" href="http://brainlog.coryzipperle.com">Sixth Link</a>
Here is the CSS for a top to bottom gradient:
a {
height: 40px;
line-height: 40px;
padding-left: 0.8em;
padding-right: 0.8em;
border-top-left-radius: 8px;
border-top-right-radius: 8px;
color: #000;
text-decoration: none;
/* Safari 4-5, Chrome 1-9 */
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#42c264), to(#4fec50));
/* Safari 5.1, Chrome 10+ */
background: -webkit-linear-gradient(top, #4fec50, #42c264);
/* Firefox 3.6+ */
background: -moz-linear-gradient(top, #4fec50, #42c264);
/* IE 10 */
background: -ms-linear-gradient(top, #4fec50, #42c264);
/* Opera 11.10+ */
background: -o-linear-gradient(top, #4fec50, #42c264);
}
If you’re looking to go from left to right:
a.second {
height: 40px;
line-height: 40px;
padding-left: 0.8em;
padding-right: 0.8em;
border-top-left-radius: 8px;
border-top-right-radius: 8px;
color: #000;
text-decoration: none;
/* fallback */
background-color: #42c264;
background-image: url(images/linear_bg_1.png);
background-repeat: repeat-y;
/* Safari 4-5, Chrome 1-9 */
background: -webkit-gradient(linear, left top, right top, from(#42c264), to(#4fec50));
/* Safari 5.1, Chrome 10+ */
background: -webkit-linear-gradient(left, #4fec50, #42c264);
/* Firefox 3.6+ */
background: -moz-linear-gradient(left, #4fec50, #42c264);
/* IE 10 */
background: -ms-linear-gradient(left, #4fec50, #42c264);
/* Opera 11.10+ */
background: -o-linear-gradient(left, #4fec50, #42c264);
}
If you’re looking to stick gradients in the middle somewhere:
a.third {
height: 40px;
line-height: 40px;
padding-left: 0.8em;
padding-right: 0.8em;
border-top-left-radius: 8px;
border-top-right-radius: 8px;
color: #000;
text-decoration: none;
/* Safari 4-5, Chrome 1-9 */
background: -webkit-gradient(linear, left top, right top, from(#42c264), color-stop(0.25, #4fec50), color-stop(0.5, #42c264), color-stop(0.75, #4fec50), to(#42c264));
/* Safari 5.1+, Chrome 10+ */
background: -webkit-linear-gradient(left, #42c264, #4fec50, #42c264, #4fec50, #42c264);
/* Firefox 3.6+ */
background: -moz-linear-gradient(left, #42c264, #4fec50, #42c264, #4fec50, #42c264);
/* IE 10 */
background: -ms-linear-gradient(left, #42c264, #4fec50, #42c264, #4fec50, #42c264);
/* Opera 11.10+ */
background: -o-linear-gradient(left, #42c264, #4fec50, #42c264, #4fec50, #42c264);
}
It’s always good to toss in some kind of fallback code so that you give browsers that don’t know what to do with all this gradient stuff can still play on your website too:
a {
height: 40px;
line-height: 40px;
padding-left: 0.8em;
padding-right: 0.8em;
border-top-left-radius: 8px;
border-top-right-radius: 8px;
color: #000;
text-decoration: none;
/* fallback */
background-color: #1a82f7;
background: url(images/linear_bg_2.png);
background-repeat: repeat-x;
/* Safari 4-5, Chrome 1-9 */
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#42c264), to(#4fec50));
/* Safari 5.1, Chrome 10+ */
background: -webkit-linear-gradient(top, #4fec50, #42c264);
/* Firefox 3.6+ */
background: -moz-linear-gradient(top, #4fec50, #42c264);
/* IE 10 */
background: -ms-linear-gradient(top, #4fec50, #42c264);
/* Opera 11.10+ */
background: -o-linear-gradient(top, #4fec50, #42c264);
}
If you’re looking for gradients that stop on the edges somewhere:
a.fourth {
height: 40px;
line-height: 40px;
padding-left: 0.8em;
padding-right: 0.8em;
border-top-left-radius: 8px;
border-top-right-radius: 8px;
color: #000;
text-decoration: none;
/* Safari 4-5, Chrome 1-9 */
background: -webkit-gradient(linear, left top, right top, from(#42c264), color-stop(0.05, #4fec50), color-stop(0.5, #42c264), color-stop(0.95, #4fec50), to(#42c264));
/* Safari 5.1+, Chrome 10+ */
background: -webkit-linear-gradient(left, #42c264, #4fec50 5%, #42c264, #4fec50 95%, #42c264);
/* Firefox 3.6+ */
background: -moz-linear-gradient(left, #42c264, #4fec50 5%, #42c264, #4fec50 95%, #42c264);
/* IE 10 */
background: -ms-linear-gradient(left, #42c264, #4fec50 5%, #42c264, #4fec50 95%, #42c264);
/* Opera 11.10+ */
background: -o-linear-gradient(left, #42c264, #4fec50 5%, #42c264, #4fec50 95%, #42c264);
}
Gradient that centers with a hot spot. It’s kind of difficult to see with this example, but the code is there for you to try on your own:
a.fifth {
height: 40px;
line-height: 40px;
padding-left: 0.8em;
padding-right: 0.8em;
border-top-left-radius: 8px;
border-top-right-radius: 8px;
color: #000;
text-decoration: none;
/* fallback */
background-color: #4fec50;
background-image: url(images/just-in-case.png);
background-position: center center;
background-repeat: no-repeat;
/* Safari 4-5, Chrome 1-9 */
/* You can't specify a percentage */
background: -webkit-gradient(radial, center center, 0, center center, 460, from(#42c264), to(#4fec50));
/* Safari 5.1+, Chrome 10+ */
background: -webkit-radial-gradient(circle, #42c264, #4fec50);
/* Firefox 3.6+ */
background: -moz-radial-gradient(circle, #42c264, #4fec50);
/* IE 10 */
background: -ms-radial-gradient(circle, #42c264, #4fec50);
/* Opera had trouble doing this style of gradient, then at some point they started supporting the -webkit- syntax, now it almost works but it doesn't do sizing) */
}
And lastly, a Gradient that puts a spot in there somewhere:
a.sixth {
height: 40px;
line-height: 40px;
padding-left: 0.8em;
padding-right: 0.8em;
border-top-left-radius: 8px;
border-top-right-radius: 8px;
color: #000;
text-decoration: none;
/* fallback */
background-color: #4fec50;
background-image: url(images/just-in-case.png);
background-position: 80% 20%;
background-repeat: no-repeat;
/* Safari 4-5, Chrome 1-9 */
background: -webkit-gradient(radial, 80% 20%, 0, 80% 40%, 100, from(#42c264), to(#4fec50));
/* Safari 5.1+, Chrome 10+ */
background: -webkit-radial-gradient(80% 20%, closest-corner, #42c264, #4fec50);
/* Firefox 3.6+ */
background: -moz-radial-gradient(80% 20%, closest-corner, #42c264, #4fec50);
/* IE 10 */
background: -ms-radial-gradient(80% 20%, closest-corner, #42c264, #4fec50);
/* Opera cannot do radial gradients yet */
}
Look at the code in action.