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.



@Matt: Personally, I think it’s better to use the current standard, rather than trying to force people to look at your site in FF. There are still a lot of companies that use IE — and really old versions of IE, believe me — who will need to see your portfolio the way you intend. I’m holding out on using any of the new CSS or HTML properties until they’re more widely supported; I wouldn’t want to create a site for a client that any potential clients might not be able to see. You could argue that it’d still look decent in IE, but I like my sites to look the same across all browsers and platforms. Call me old school, but it can’t be hurting me, considering business is pretty good.
Best wishes to you on your portfolio! Right now is a great time to start a business in this field. (:
Worth it… lovely :)
There is still debate about using CSS3 or not.
I would say that CSS3 is just another updated, its depends on us—the web community—to make it more familiar in our code, the earlier we start the sooner these browser will updated their databases so that they can show these new beautiful looking websites. Because in the end browser fight is still on. :)
Our community must take advantage of this fight, and use latest technologies and force these browser companies to upgrade their systems. :)
Olivo (www.greenolivz.com)
Whats the necessary to use CSS3?
Very cool, can’t wait until ie 9 comes out and css becomes the norm.
thanks for the tutorial :)
Very cool! Is it weird that I prefer the Non-CSS3 look?
css become more powerfull for design website… i will looking forward to it
We Soniktechnologies Specializes in Website Designing, Website Development, Search Engine Optimization, Multimedia Flash Presentation, Template Designing, Brochure Designing, Website Redevelopment or Website Redesigning, Web development, Web designing, Email Marketing, Website Hosting, Portals. For more information contacts us our live support is online 7 days 24 hours. Effective.
Go example of solid css3. I like how you’ve shown the IE version – very bullet-proof.
nice post..i’ll try it
nice post..good
good post, very inspired to me! thanks~~!
Very good blog and it’s really a web designer’s wall. This blog is very clear and eye cool to read, all articles are outstanding. Usability wise perfect, design wise also. Thanks for the good works. Thanks for all free stuffs. Thanks to inspire us.
i tried ., very gud creativity
Nice tutorial, used it on one of my sites!
nice,,,very beautiful
it very nice post.
grate idea … thanks..
Great post, can’t wait to try these out!!
Cheers!!
While Opera doesn’t support CSS Gradient, you can use inner box shadow to get a similar effect. For example, adding a simple declaration for the search button:
box-shadow: inset 0 20px 20px -10px rgba( 255, 255, 255, 0.3 );
That should give a semi-transparent white “gradient” style effect. I have difficulty recommending gradients personally. While there are many things that could be made wonderfully possible with it ( and with adoption of text-stroke ), it currently has fairly different implementations between webkit and mozilla.