Setting CSSClass property of Label control?

Discussion in 'ASP .Net' started by Mervin Williams, Apr 6, 2004.

  1. 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';
    }
    Mervin Williams, Apr 6, 2004
    #1
    1. Advertising

  2. Mervin Williams

    Scott Guest

    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" <> wrote in message
    news:%23IY3$V$...
    > 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';
    > }
    >
    >
    Scott, Apr 6, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. George Jordanov Ivanov

    Literal control doesn't have CssClass property?

    George Jordanov Ivanov, Mar 30, 2006, in forum: ASP .Net
    Replies:
    6
    Views:
    15,326
    WarNov
    Sep 13, 2006
  2. =?Utf-8?B?QVNQIERldmVsb3Blcg==?=

    CssClass property is ignored with wizard control (For some Users)

    =?Utf-8?B?QVNQIERldmVsb3Blcg==?=, Sep 19, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    590
    =?Utf-8?B?QVNQIERldmVsb3Blcg==?=
    Sep 19, 2006
  3. Mervin Williams

    Setting CSSClass property of Label control?

    Mervin Williams, Apr 6, 2004, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    136
    Mervin Williams
    Apr 6, 2004
  4. Sky
    Replies:
    2
    Views:
    276
    Robert Koritnik
    Oct 1, 2004
  5. Knut Krueger
    Replies:
    8
    Views:
    253
    Knut Krueger
    Aug 20, 2013
Loading...

Share This Page