Setting CSSClass property of Label control?

  • Thread starter Mervin Williams
  • Start date
M

Mervin Williams

I am having a problem setting the CSSClass property of a my Label control.
I set CSSClass property, but its not taking the font style settings. Here
is my style:

..TabText
{
font-weight: bold;
font-size: 16pt;
text-transform: uppercase;
color: white;
font-family: Tahoma, Verdana, 'Times New Roman';
}
 
S

Scott

Which font style setting? All of them or just a particular item? This works for me:


<%@ Page language="c#" AutoEventWireup="false" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
<title>LblCssClass</title>
<style>
..TabText
{
font-weight: bold;
font-size: 16pt;
text-transform: uppercase;
color: white;
background-color: black;
font-family: Tahoma, Verdana, 'Times New Roman';
}
</style>
</head>
<body>
<form id="Form1" method="post" runat="server">
<asp:label id="Lbl" runat="server" cssclass="TabText">Hello</asp:label>
</form>
</body>
</html>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top