Lately I've been playing around with CSS3 and discovered some new CSS tricks. Did you know you can make a round circle with border-radius and create inner shadow effect with box-shadow inset? Check out this beautiful search form demo that I've created with CSS gradient, border-radius, and box-shadow. It displays perfect in CSS3 browsers and degrades gracefully in non-CSS3 browsers.
Round Circle Trick
You can create a round circle by specifying a very large value with the border-radius property. The following example uses 100px border-radius to make a round circle.
.circle {
width: 100px;
height: 100px;
-moz-border-radius: 100px;
-webkit-border-radius: 100px;
}
Inner Shadow Effect
Specifying inset values with the box-shadow property to create a inner shadow effect. As of now, this feature is only supported by Chrome 4+ and Firefox 3.5+.
.inset {
-moz-box-shadow: inset 0 3px 8px rgba(0,0,0,.4);
-webkit-box-shadow: inset 0 3px 8px rgba(0,0,0,.4);
box-shadow: inset 0 3px 8px rgba(0,0,0,.24);
}
Search Form Example
The following search form demo is created with CSS gradient, border-radius, and box-shadow with inset values (view the demo with Chrome 4+ or Firefox 3.5+). It degrades nicely in non-CSS3 browsers. View source code to learn the CSS code. If you are not familiar with CSS3, read my previous article The Basics of CSS3.



That’s very nice idea of creating circle by utilizing radius feature.
I like it.
is very good, creative things to do in html and css3, excellent
asd
asdasdasd
what
Really cool, although the button needs a hover state, active state and ideally a spinner on click, I’m just adding this now :)
Great write up. Our website is getting a bit large and unfortunately its time for a search box…..just not sure how its going to fit into the design. Thx again.
I love the circular search button. Great article, much appreciated. Will be implementing this on one of my new sites.
Cheers!
Enter your comment here.
Spintax is supported:
Hello, I think your post was outstanding.
nice and attractive design code.
demo is, unfortunately, hosed in ie, but nice idea :)
http://www.luvcelebs.com/ please check for search box.
Nice search box! I was searching for this for an hour!
That’s very nice idea of creating circle by utilizing radius feature.
I like it.
Good and nice
I like it!
Hello!,,,,,Thanks so much. It’s very useful!Great post, can’t wait to try these out!!!!!!!!!!!!!!!!!!!!
Thanks!,,,,,,,
this is great thanks for code
hey,
Excellent post. It has been explained in awesome way. :)
Thanks
Love the search form demo! really helpful tutorial, thank you so much for this post!!!!!,,,
quite a few fake ones in there
is very good, creative things to do in html and css3, excellent