CSS and server controls

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • calvinX

    CSS and server controls

    Hi Everyone,

    My question involves my <ASP:Textbox> and <ASP:label> controls.

    I have created a class in my styles.css file and linked it to my document.
    I have set the CSSClass property for one of my servercontrols (textbox) to
    the class name but It does not change the appearance of the control at
    runtime or design time. I am assuming that the style will not ripple down
    at design time in the editor but it should still work in the browser at run
    timne should it not. here is my style:

    ..MainListTextb ox
    {
    border-color:Gray;
    border-width:1px;
    border-style:solid;
    font-family: Tahoma, sans-serif;
    font-size:xx-small;
    font-style:normal;
    text-decoration:none ;
    word-spacing:normal;
    letter-spacing:normal;
    color:mediumblu e;
    width:500px;
    height:150px;
    }

    And here is the control that is trying to use it:

    <asp:TextBox id=txtDesc runat="server" Height="100px" Width="100px"
    CssClass=".Main ListTextBox" TextMode="Multi Line" ReadOnly="True" text='<%#
    DataBinder.Eval (Container.data item, "Desc") %>'></asp:TextBox>

    any help or pointers to resources using CSS Styles for ASP.NET controls in
    would be great. I would like to store the styles in my .css file, which I
    am doing now.

    Thanks a bunch,

    CalvinX


  • calvinX

    #2
    Re: CSS and server controls

    forget it...

    I was using a period in the class name ".MainListTextB ox" >>
    "MainListTextBo x



    "calvinX" <robot_spamreli ef_drone_nospam @hotgrail.com> wrote in message
    news:%23$7b1m6p DHA.2268@TK2MSF TNGP12.phx.gbl. ..[color=blue]
    > Hi Everyone,
    >
    > My question involves my <ASP:Textbox> and <ASP:label> controls.
    >
    > I have created a class in my styles.css file and linked it to my document.
    > I have set the CSSClass property for one of my servercontrols (textbox) to
    > the class name but It does not change the appearance of the control at
    > runtime or design time. I am assuming that the style will not ripple down
    > at design time in the editor but it should still work in the browser at[/color]
    run[color=blue]
    > timne should it not. here is my style:
    >
    > .MainListTextbo x
    > {
    > border-color:Gray;
    > border-width:1px;
    > border-style:solid;
    > font-family: Tahoma, sans-serif;
    > font-size:xx-small;
    > font-style:normal;
    > text-decoration:none ;
    > word-spacing:normal;
    > letter-spacing:normal;
    > color:mediumblu e;
    > width:500px;
    > height:150px;
    > }
    >
    > And here is the control that is trying to use it:
    >
    > <asp:TextBox id=txtDesc runat="server" Height="100px" Width="100px"
    > CssClass=".Main ListTextBox" TextMode="Multi Line" ReadOnly="True" text='<%#
    > DataBinder.Eval (Container.data item, "Desc") %>'></asp:TextBox>
    >
    > any help or pointers to resources using CSS Styles for ASP.NET controls in
    > would be great. I would like to store the styles in my .css file, which I
    > am doing now.
    >
    > Thanks a bunch,
    >
    > CalvinX
    >
    >[/color]


    Comment

    Working...