473,385 Members | 1,642 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,385 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 4351

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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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

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.