CSS and server controls

  • Thread starter Thread starter calvinX
  • Start date Start date
C

calvinX

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:

..MainListTextbox
{
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:mediumblue;
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=".MainListTextBox" TextMode="MultiLine" ReadOnly="True" text='<%#
DataBinder.Eval(Container.dataitem, "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
 
forget it...

I was using a period in the class name ".MainListTextBox" >>
"MainListTextBox
 
Back
Top