Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

css3 for this button

css3 for this button

Problem

I have attached the image of the button. On a site I am working with only has this image. It doesn't have PSD or PNG so I am not sure what font-family and size is there. I was asked to create a css that resembles to that image and after several tries and not being designer and css guy I came up with this css3

.test
{
  border-top: 1px solid;
   background: #ebebeb;
   background: -webkit-gradient(linear, left top, left bottom, from(#ebebeb), to(#ebebeb));
   background: -webkit-linear-gradient(top, #ebebeb, #ebebeb);
   background: -moz-linear-gradient(top, #ebebeb, #ebebeb);
   background: -ms-linear-gradient(top, #ebebeb, #ebebeb);
   background: -o-linear-gradient(top, #ebebeb, #ebebeb);
   padding: 5px 10px;
   -webkit-border-radius: 3px;
   -moz-border-radius: 3px;
   border-radius: 3px;
   -webkit-box-shadow: #ebebeb 0 1px 0;
   -moz-box-shadow: #ebebeb 0 1px 0;
   box-shadow: #ebebeb 0 1px 0;
   text-shadow: #ebebeb 0 1px 0;
   color: #4d4c4d;
   font-size: 12px;
   font-family: font-family: Arial,sans-serif;
   font-weight:lighter;
   text-decoration: none;
   vertical-align: middle;
}

But the font size and back-ground is still a little off. I thought may be some css3 gurus around here have the answer for me as to what am I missing to have the exact same copy?

here is my copy on fiddle http://jsfiddle.net/Fbpg6/

Problem courtesy of: Autolycus

Solution

All those gradients are doing nothing. Start and end colors are identical.

You're missing a few color declarations in several places as well.

See if THIS DEMO Is closer.

(Note I added margin just to move it away from frame edges.)

Solution courtesy of: Metis

Discussion

View additional discussion.



This post first appeared on CSS3 Recipes - The Solution To All Your Style Problems, please read the originial post: here

Share the post

css3 for this button

×

Subscribe to Css3 Recipes - The Solution To All Your Style Problems

Get updates delivered right to your inbox!

Thank you for your subscription

×