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. Advertisements

  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. Advertisements

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. Ric Pullen
    Replies:
    1
    Views:
    628
    =?Utf-8?B?VGltOjouLg==?=
    Aug 5, 2004
  2. CMM

    CssClass Property

    CMM, Mar 20, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    2,057
  3. George Jordanov Ivanov

    Literal control doesn't have CssClass property?

    George Jordanov Ivanov, Mar 30, 2006, in forum: ASP .Net
    Replies:
    6
    Views:
    18,133
    WarNov
    Sep 13, 2006
  4. =?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:
    759
    =?Utf-8?B?QVNQIERldmVsb3Blcg==?=
    Sep 19, 2006
  5. Nathan Sokalski
    Replies:
    25
    Views:
    1,846
    Nathan Sokalski
    Mar 4, 2010
  6. Mervin Williams

    Setting CSSClass property of Label control?

    Mervin Williams, Apr 6, 2004, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    239
    Mervin Williams
    Apr 6, 2004
  7. Sky
    Replies:
    2
    Views:
    498
    Robert Koritnik
    Oct 1, 2004
  8. Knut Krueger
    Replies:
    8
    Views:
    633
    Knut Krueger
    Aug 20, 2013
Loading...