When you have a master page, you'll find that .NET changes the client side ID of your controls, to reflect the control hierarchy they're in. So, when you have a text box with an ID of txtUserName, it may come out completely different, with prefixes for the content placeholder etc.
Don't worry about the underscores. I couldn't remember the exact syntax when I typed that message, so I just made something up.
Two ways to fix it:
1. Look at the client code. If the ID is something like :
ctl00_ContentPlaceHolder1_lbllblLeaderName
then add the following to your stylesheet:
#ctl00_ContentPlaceHolder1_lbllblLeaderName
{
}
You said you habe that already, so something else must be going wrong. Make sure you applied the correct style sheet (maybe there's a path issue to the style sheet in your master page? Check the HTML source so see if the page is referencing the correct style sheet).
2. Use a class instead of an ID:
<asp:TextBox id="SomeId" CssClass="SomeClass" />
Then in your CSS add this:
.SomeClass
{
// CSS definition goes here.
}
If all this doesn't work, please post your code. For me, that works a lot better than posting links to .doc files...
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of
ASP.NET 2.0 Instant Results and
Beginning Dreamweaver MX / MX 2004