473,320 Members | 2,073 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,320 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 4350

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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.