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.



Will it be standards compliant though? That’s what I worry about. If it doesn’t look the same in all browsers as well I won’t use it until it is implemented into the majority of them. I’d rather not rely on too many little tricks like this if I can absolutely help it.
Hi there…
You have a very Good website and OMG its so beautiful..
I have a question….
Can you tell me how did you designed your collapsible comment box..
I really like this.I want the same effect for my wordpress tooo..
Will you have a look at https://payperpost.com/bloggers/faq/
They have sliding questions in there post how to do that…
What a fantastic layout you’ve done here, congratulations! It’s been a great inspiration to me. Despite the fact some css3 effects doesn’t work on IE (i really don’t care, to be honest), i’ll use this style of search box. Thanks for show us.
So nice, very detailed…
Thanks for sharing :)
nice search that will work for browsers that support CSS3 and also it would like ok in those that don’t…web design gets more exciting with CSS3 :) thanks for sharing!
sorry to say this, but Chrome does NOT work out well.
Nice sharing, thanks mate!
So nice, very detailed…
Thanks for sharing
Doesn’t work in Chrome.
Hey guy it looks pretty cool in your preview, but unfortunately it doesn’t work in IE8! I cant understand why the developer from IE takin` so much time to fix it!?
It’s the
box-shadow: inset …
that breaks it in Google Chrome.
Just delete the line
box-shadow: inset 0 1px 2px rgba(0,0,0,.2);
and it’s fine in Chrome.
… and don’t bother about IE. It’s broken anyway!
Lovely search form. Come on you IE lot. Pull your finger out so we can make the internet a better place
If I am making a portfolio, is it better to just make it with CSS3 and say “best viewed in Firefox” and force everyone to use Firefox?
Or best to code for all browsers to look the same,even if it means extra images/for IE and Safari etc..??
It works fine in Safari also. Nice written article.
cool trick! css 3 rocks!
Thanks! A few bugs in chrome otherwise i would have swapped for the search bar here!
Thanks again!
Hi,
try to have a look at this nice solution for rounded/curved corners (IE6 to IE 8):
http://code.google.com/p/curved-corner/
Great stuff, css3 is really going round the web lately, all preparing for the big shift, html5 n css3, upgrade those skills!
Beautiful. Can’t wait for CSS3.
That turned out BEAUTIFUL for me… Using it for my blog! awesome!