Click here to Skip to main content
15,897,226 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a user control which has a CSS and the CSS effect the parent page too.
for example i set font or color for the user control body ,
but it effects the parents body too and the text change there too.
do u have any idea?
Posted
Comments
supyalmail 8-Nov-12 4:18am    
how to change the css of usercontrol button from parent page

1 solution

Make sure that you don't use the same class names in multiple css files. That always has the potential of causing problems.
 
Share this answer
 
Comments
Christ_88 26-Sep-11 13:43pm    
body
{
margin: 0px 0px 0px 0px;

padding: 0px 0px 0px 0px;
font-family: verdana, arial, helvetica, sans-serif;
font-size: 11px;
letter-spacing: 0.4pt;
color: #666666;

}
i used body i didnt use any class
fjdiewornncalwe 26-Sep-11 14:16pm    
If your body tag exists in both css files, then it is the virtually the same thing. They will conflict with each other. If you want a custom body tag in your user control's css, then you may want to rename it as a class and apply it to the body of your control manually using a class name.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900