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.



It does not work on IE9
That’s a feature.
hell yeah
To use border-radius in IE9 you will need to define all four corners.
Example:
border-radius: 100px 100px 100px 100px;
Note that the prefix: “-moz-” and ” -webkit-” are for Mozilla Firefox, and Google Chrome and Safari respectably. By using the prefix it will not work in IE or Opera (Opera uses the prefix -o-).
Nothing works on IE9
Yes, the W3C standard (border-radius) works on IE9. FYI -moz and -webkit extentions are non standard proprietary extentions, the same kind as IE5 was full of.
some strange borders displays on Google Chrome.
I confirm, i see the same borders in Chrome!
Do you mean the outline?
You can fix it with outline:none;
Recent surveys, children of depressed mothers’ negative patterns of activity occurring in different brain reveals. This is for children of mothers who take more risks in the future is going to have depression.
Really like your tutorial. How would you do this to customize a Google Custom Search form?
Thanks again.
Pretty component to content. I just stumbled upon your site and in accession capital to claim that I get actually enjoyed account your weblog posts. Anyway I will be subscribing for your feeds and even I achievement you get entry to constantly rapidly.
That was a some strange borders displays on Google Chrome.
Attractive section of content. I just stumbled upon your website and in accession capital to assert that I get in fact enjoyed account your blog articles. Anyway I’ll be subscribing to your augment and even I achievement you access consistently rapidly.
Thank you for that very interesting.
This is verry good
Looks great on FF & Chrome, but bad on IE9.
+1 for looks fine in all modern browsers except ie9 which bungles the area around the circle and the text is not centered.
Looks good for me in Ff,Chrome and IE 9. But how to include search icon inside the box itself ?
Howdy! This is my 1st comment here so I just wanted to give a quick shout out and tell you I truly enjoy reading your blog posts. Can you suggest any other blogs/websites/forums that go over the same subjects? Thank you!
This is the content very useful.
I see really strange borders in Chrome…
We love CSS, Ajax and jQuery in equal measure. Along with Cufon it unchained us from dreaded tables, Arial and useability. Contact forms is the first point of contact for most websites so tuts like this are really useful. Thanks for sharing
Love the search form demo! really helpful tutorial, thanks v much!
how to install app iphone 4
Great looking search form!
hello my friend, nice to meet you, visit is my website if interest Small Dog Breeds, welcome to site.