Styling ASP controls
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<style>
body {
FONT-SIZE: 12px;
COLOR: blue;
FONT-FAMILY: arial, helvetica, verdana, sans-serif;
TEXT-DECORATION: underline
}
.button
{
FONT-WEIGHT: bold;
FONT-SIZE: 14px;
COLOR: red;
background-color:Yellow;
FONT-FAMILY: arial, helvetica, verdana, sans-serif;
TEXT-DECORATION: none
}
.label
{
FONT-WEIGHT: bold;
FONT-SIZE: 11px;
COLOR: black;
FONT-FAMILY: arial, helvetica, verdana, sans-serif;
TEXT-DECORATION: none
}
</style>
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="Button1" runat="server" Text="Button" CssClass="button"></asp:Button>
<asp:Label ID="Label1" runat="server" CssClass="body">
This is some sample text.
</asp:Label>
</div>
</form>
</body>
</html>
Related examples in the same category