CSS and Asp.Net 2.0 master pages

S

shapper

Hello,

When I use a master page all ID's are renamed to ct100_MyControl.

Consider I have a control which ID is not change on the client.

Consider that control would generate <a> tags on the client inside a
div where ID = "MyControl" and Class="MyCSS".

Well, I could redifine the <a> tags simply by using the following CSS:

div#pMyControl a, div#pMyControl a:link, div#pMyControl a:visited
{
color: #404040;
text-decoration: none;
}


The problem is that the control ID is changed to div#ct100_pMyControl.

Yes, I know: I could use ct100_pMyControl in my CSS code.

However this seems wrong to do and forces me to check all client ID's
after running the web site.

Could someone tell me what should be the solution for this Asp.Net 2.0
problem?

Thanks,

Miguel
 
B

bruce barker \(sqlwork.com\)

put a class specifier on the control instead.

-- bruce (sqlwork.com)
 

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,965
Messages
2,570,148
Members
46,710
Latest member
FredricRen

Latest Threads

Top