Home  »  Articles  »  ASP.Net  »

Change The Style/Designing of ASP.Net Button and TextBox

 Posted By : Manoranjan SahooPosted Date : 27/10/2010 05:50:42 AM Category : ASP.Net Points : 3

you can use css class to make change of style for textbox or button

see below code :

<html>
<head runat="server">
<title>TextBox or Button Design</title>
<style type="text/css">
.txtbox
{
background-color: lightgray;
width: 120px;
height: 20px;
border-width:1px;
border-style:solid;
border-color:blue;
vertical-align: middle;
font-family: Verdana, Geneva, sans-serif;
font-size: 12px;
text-align: left;
padding: 3px;
}

.btn
{
background-color: green;
width: 120px;
height: 20px;
border-width:1px;
border-style:solid;
border-color:blue;
vertical-align: middle;
font-family: Verdana, Geneva, sans-serif;
font-size: 12px;
text-align: left;
color:white;
padding: 5px;
cursor: pointer;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server" CssClass="txtbox"/>
<asp:Button ID="Button1" runat="server" Text="Submit" CssClass="btn" />
</div>
</form>
</body>
</html>

Thank You.


Responses
No responses found for this thread. Be the first to respond this thread.
Post Reply
Login to post Response.