tags:

views:

795

answers:

3

can anyone suggest me for a round corners text area box either in javascript or in css

+1  A: 

A "classic" way to do this, is using a background-image on a div around the textarea and setting border/outline of the textarea to none, like this:

<div style="background-image: url(image/with/rounded/corners.png);">
    <textarea style="border: none; outline: none;">
    </textarea>
</div>

CSS3 supports rounded corners, but that is not well supported, see e.g. http://www.css3.info/preview/rounded-border/

Residuum
+2  A: 

I use jQuery Corner. It applies css3 corners to the browsers that support them and draws corners for the browsers that don't (IE).

jeroen
A: 

Hey,

Rounded corners could be done with Rico: http://juixe.com/techknow/index.php/2006/08/10/rounded-corners-with-rico/, a JS library in addition to the JQuery plugin mentioned in the other post.

Or, you can do rounded corners with teh AjaxControlToolkit RoundedCornersExtender: http://www.asp.net/AJAX/AjaxControlToolkit/Samples/RoundedCorners/RoundedCorners.aspx

Brian