Last post Mar 05, 2012 01:02 AM by Allen Li - MSFT
Mar 02, 2012 09:10 AM|kiran ghadge|LINK
I have developed one site, for which i can apply no of themes successfully. But now my requirement is that, for master page i want to apply seperate css or you can say comman css which will not change as per theme changes, now how to implement such functionality.
i want common css to apply for some controls of master page .
Mar 02, 2012 09:19 AM|Horizon_Net|LINK
with ASP.NET you have two options. You can link your CSS file like you would do it in a normal case in your master page. This stylesheet will define the appearance of the elements which are present in your master page. Then you can also define stylesheets
for your subsites which will define the appearance of the elements defined in the subsite.
The second way is the usage of themes. With that you can also define the appearance of server controls without the need of CSS. A theme file is a separate file where you outsource the appearance definitions which you normally would do on the site itself.
My recommendation is that you use the first option.
Mar 02, 2012 09:20 AM|roopeshreddy|LINK
You can create a separate CSS styles for the controls and apply it!
And also, you can create a .skin file in the Theme and specify the SkinId
and apply for the conrtol which you want the unique styles!
Hope it helps u...
Mar 02, 2012 09:26 AM|kiran ghadge|LINK
I have already created seperate css file and added that to master page like
<link href ="Common/CommanStyle.css" rel ="Stylesheet" type ="text/css"/>
but still controls are not applied with perticluar style.
<td class="tdWidgetHeaderContent" align="left" id="csstest">
<asp:Label ID="lblBannerHeader" Text="test" runat="server"
Mar 02, 2012 09:38 AM|roopeshreddy|LINK
It seems styles are overridden!
You can try with !important property!
Check the below link!
Mar 03, 2012 12:00 PM|shafkatlee|LINK
CSSClass property will allow you to stable css.
Theme property of page will be changed dynamically for controlled assigned skin Id.
Mar 05, 2012 01:02 AM|Allen Li - MSFT|LINK
Hi, I tried your codes and found it works on my computer. Since the “color” is “White” and the original background-color is “White” too, the words in “<td></td>” cannot be seen properly. Please change the “color” attribute to other colors and check whether
the style can displayed properly, for example: