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.



so it looks great – but how do i make it search , am i missing something? :(
dude learn php
@bface you’ll need some form of searching capabilities added to the form using either ajax or php or any other form of dynamic solution.
Nice post. I found this blog with withbest practices for creating a search form that is quick and easy to use
http://blog.caspio.com/web-database/7-tips-for-creating-user-friendly-search-forms/
Nice post. I found this blog with withbest practices for creating a search form that is quick and easy to use http://blog.caspio.com/web-database/7-tips-for-creating-user-friendly-search-forms/
I think bface might be talking about the searchbutton not working when clicking it.
For me the search button didn’t work when using the mouse either.
in the html section change type=”button” to type=”submit”
also i added in the css class .searchbutton
cursor: pointer;
thanks for the article it was awesome.
definitely, a BIG BIG deals.thx, for article
Nice one chap will look to implement asap. I like your header too…awesome!
Great idea!!! Thanks
We LOVE the look of this, but when implemented, it doesn’t display correctly in IE. It makes the GO button into a square, around the circle, and looks terrible. We also noticed that on an iphone, the word GO is not aligned in the center of the circle.
Any help with resolving those 2 issues would be welcomed!
See our site for an example…
Nice post. I found this blog with withbest practices for creating a search form that is quick and easy to use
can u upload the source ?
nice tutorial.. but if u can give us the download source code its better
Hi,
Can you please provide the source code for it to download. Very Nice Search box, i would like to intergrate it onto my website, also how can i use different images for search button to look stand out.
thanks
Alex
Nice tutorial. Thanks.
I have an article on my website that shows you to create form from scratch like how to put image instead of word go. I also tell you how to get the form to work. http://www.cyberfanatic.com/pages/snippets/html/google-custom-cse.php
Dont let the link fool you even though the link says google custom cse dont worry about that. I use google to process the search query and display results. Just visit the link. Two minutes and you”ll be like why didnt i know about this before
Por favor, poderia me enviar por e-mail o código fonte do formulário com bordas arredondadas? Obrigado!!!
This does look like a great theme.t