Click here to Skip to main content
15,884,177 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Dear Frnds !!!

I have a Ajax WaterMark extender Textbox on my webpage. I need that Textbox corners to be Rounded.

Rounded Corners Textbox USIng CSS

Please suggest me, to create a Good looking Rounded Textbox and Buttons


Thanks.
Posted

try this:

XML
<head runat="server">
    
    <style type="text/css">
        .txtbox
        {
            border-top-left-radius: 20px;
            border-top-right-radius: 20px;
            border-bottom-left-radius: 20px;
            border-bottom-right-radius: 20px;
        }
    </style>
</head>

and apply the css class to textbox as:
ASP.NET
<asp:TextBox ID="TextBox1" runat="server" cssclass="txtbox"></asp:TextBox>

this definitely works.
 
Share this answer
 
v2
Comments
Ranjith Reddy CSE 13-May-12 3:36am    
this is not working
member60 13-May-12 23:55pm    
check my solution once it is working.I had made mistake in specifying style tag first,that may be the reason for not working.
Ranjith Reddy CSE 14-May-12 1:39am    
No Boss, This code is not Working, After Execution its shows like normal Textbox its NOT Rounded.....please suggest me a good solution...THANX.
member60 14-May-12 1:50am    
fine! i don't know why it is not working at you but it shows rounded corner textbox for mine. let it be. Happy coding!
Ranjith Reddy CSE 14-May-12 1:57am    
Boss, i have Tried this....its working but after i put cursor inside textbox...its shows rectangle shape at borders....its shows rounded as well as rectangle after cursor puts.

This is my code.
.TextSearch
{
border:2px solid;
border-radius:25px;
-moz-border-radius:25px;
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900