473,406 Members | 2,293 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Setting CSSClass property of Label control?

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';
}
Nov 18 '05 #1
1 4352

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>
"Mervin Williams" <mw*******@innovasolutions.net> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
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';
}

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Mervin Williams | last post by:
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:...
2
by: John Holmes | last post by:
I would like to turn on a label control in javascript with the onfocus event of another control by setting the Visible property to true. When I try and reference this label control it says...
6
by: hecsan07 | last post by:
I need to use a label control that depending on the page where the control is use sets the control into a sort of edit mode. That is, I need to use a label that sometimes I can type text to. Can...
3
by: PK9 | last post by:
I'm having some issues with using a Response.Write or the shortcut ( <%= ...) from within a label control. I cannot do this in the code behind, I need to do it here at runtime. I have a public...
5
by: George Jordanov Ivanov | last post by:
All, Today I was playing with Literal control. Basically it is more or less like the Label control with this difference that Literal control is something like "lightweight" text container (that...
3
by: david | last post by:
I never use CSS for asp.net. I would like to get help about how to write CSS for the font size of asp label control. I have a lot of labels in asp.net web form design page. It seems that there is...
4
by: pagates | last post by:
Hello All-- I have a number of <asp:Label CssClass="someclass">Text</asp:Labelcontrols on my page. I would like them to be shown as <div class="someclass">Text</div> rather than <span...
5
by: BobLaughland | last post by:
Hi There, I am trying to get some fields to align on a web page, like this, To: From: Subject: Each of the fields above have a corresponding asp:Textbox control next to it that I cannot...
2
daJunkCollector
by: daJunkCollector | last post by:
I am trying to display a column from a database table in the column of a datagrid. I am using a template column to display it. There are two things that are important to me: 1. If...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.