which browser do you use? In IE9 and the newest version of Google Chrome it should definitely work. Did you also specify your textbox in the following way (if it is an ASP.NET control)?
First: The validation message is true. Border-radius is a property from CSS3 and isn't included in CSS 2.1.
Which version of Firefox do you use? Is Visual Studio give you that error (normally it just displayed as a hint) or Firefox? If so, install the Service Pack 1 for Visual Studio. That ships better HTML5 and CSS3 support with it. If you have already installed
this SP change the CSS validation to CSS3 (that should be found in the toolbar).
Regards.
If my post solves your problem, please mark as answer.
amt007kmr
Member
14 Points
10 Posts
Css
Nov 24, 2011 11:14 AM|LINK
Can we apply
border-radius property in css of asp.net
RichardY
Star
8376 Points
1573 Posts
Re: Css
Nov 24, 2011 11:38 AM|LINK
Yes, but it will not be recognized by older browsers. If you want a border radius with browsers less than ie9, then use pie.htc:
http://css3pie.com/
If this does not answer your issue, please ask a more specific question.
Lazz. _
Contributor
4419 Points
754 Posts
Re: Css
Nov 24, 2011 12:06 PM|LINK
As you would do with in a regular page, CSS is the same in ASP.NET.
If you want to append css style from code behind to an ASP.NET control you can do something like this:
Control1.Attributes["style"] = "border-radius: 5px";
To help others, don't forget to mark the post as answer if it answered your question.
amt007kmr
Member
14 Points
10 Posts
Re: Css
Nov 27, 2011 02:58 PM|LINK
This is the code which i implement for the textbox.
border-radius: 6px;
-webkit-border-radius: 6px;
border: 1px solid #DADADA;
background: #F9F9F9;
box-shadow: inset 2px 2px 3px rgba(0, 0, 0, .15);
-moz-box-shadow: inset 2px 2px 3px rgba(0, 0, 0, 0.15);
-webkit-box-shadow: inset 2px 2px 3px rgba(0, 0, 0, .15);
The code given below show error.
border-radius: 6px;
-webkit-border-radius: 6px;
Is there any other way to make the corner of textbox round.
amt007kmr
Member
14 Points
10 Posts
Re: Css
Nov 27, 2011 03:24 PM|LINK
#textbox1{
border-radius: 6px;
-webkit-border-radius: 6px;
border: 1px solid #DADADA;
background: #F9F9F9;
box-shadow: inset 2px 2px 3px rgba(0, 0, 0, 0.15);
-moz-box-shadow: inset 2px 2px 3px rgba(0, 0, 0, 0.15);
-webkit-box-shadow: inset 2px 2px 3px rgba(0, 0, 0, .15);
}
I use this code to round the corner of the textbox.
But it doesnot work.
Horizon_Net
Star
8309 Points
1441 Posts
Re: Css
Nov 27, 2011 04:34 PM|LINK
Hi,
which browser do you use? In IE9 and the newest version of Google Chrome it should definitely work. Did you also specify your textbox in the following way (if it is an ASP.NET control)?
After that you should modify your CSS in the following way:
.textbox1 { border-radius: 6px; ... }If my post solves your problem, please mark as answer.
amt007kmr
Member
14 Points
10 Posts
Re: Css
Nov 28, 2011 04:51 PM|LINK
It doesnot work.
I use firefox .
The error shown is in the .aspx page.
Error is Validation (CSS 2.1): 'border-radius' is not a known css property name.
Horizon_Net
Star
8309 Points
1441 Posts
Re: Css
Nov 29, 2011 08:31 AM|LINK
First: The validation message is true. Border-radius is a property from CSS3 and isn't included in CSS 2.1.
Which version of Firefox do you use? Is Visual Studio give you that error (normally it just displayed as a hint) or Firefox? If so, install the Service Pack 1 for Visual Studio. That ships better HTML5 and CSS3 support with it. If you have already installed this SP change the CSS validation to CSS3 (that should be found in the toolbar).
If my post solves your problem, please mark as answer.
catherine se...
Participant
756 Points
190 Posts
Re: Css
Feb 22, 2013 01:27 AM|LINK
yes, you can aplly border-radius property in css
But some old version browser cannot display expected.
e.g. IE6.0
Love Version Control and .NET Scanner SDK