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.



Great job!I use Firefox and it looks pretty cool!! :)
Wow this is so simple and it looks so nice. Thanks for the tip :)
Probably a little petty, but isn’t a round circle a bit of a tautology? Otherwise great work ;)
CSS 3 depresses me. Maybe because we are stuck on IE 7 at work.
Jay, you’re gonna make me cry. Download the latest version of firefox from the mozilla website and get cracking. CSS is the most fun you can have with yer clothes on. It’ll put a smile on your face that will make people wonder what you’ve been up to… Failing that, get another job. ;)
<img src=”http://www.maniactive.com/backgrounds/quote-me.jpg”
beautiful, though on Chrome 6 the rounded-corners just outside of the typing area are squared
For a 100x100px square, 50px border-radius it’s enough.
very cool tutorial and i love CSS standards :)
That is really nice, I will have to implement that into my own site!
This is really nice css form, thank you!
Viewing this in Google Chrome, doesn’t look too good :(
Really nice post, i’ve added a css3 search form that is very similar to this on my football memorabilia site. Great work
Nice! I think it would be even cooler if you switched the gradient on the button when it’s pressed (active) or even just when it’s moused over (hover). It would even stay with the pure css. I’m just getting into web development and am always frustrated when IE refused to comply.
wow, I love the search box effect. Will definitely use it!
wow,css3 is big strong, beautiful effect ! i like it.
Wow…we don’t need backgroud-image right?
Thanks for posting your ideas and shared to us.
This is really nice css form, thank you!
I agree the looks of it is really great but c’mon I am not putting all that css code just to obtain this on a web site with! plust it doesn’t render correctly in chrome. Generally its an excellent tutorial that shows you what you can achieve with the new powerful CSS3 though.
Very interesting and useful information about css. Good luck!