CSS and server controls

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
 
C

calvinX

forget it...

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

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,143
Latest member
SterlingLa
Top