This is a migrated thread and some comments may be shown as answers.

Custom skins not working when using RadStyleSheetManager

1 Answer 126 Views
Visual Style Builder
This is a migrated thread and some comments may be shown as answers.
Derek
Top achievements
Rank 1
Derek asked on 26 Oct 2012, 11:18 AM
Hi, I've been really struggling with getting a custom skin to work in a test website.

I created a simple skin through the telerik tool and extracted the zip file into my css folder. I added in the common and telerik folders to the same css folder.

When I use a direct link tag in the header

<link href="css/MySkin/Button.MySkin.css" rel="stylesheet" type="text/css" />

With my button:

<telerik:RadButton ID="RadButton1" runat="server" Skin="MySkin" EnableEmbeddedSkins="false"  Text="RadButton" >
</telerik:RadButton>

It works fine and shows up correctly. 

When I attempt to use a RadStyleSheetManager the button shows up but with nothing in the background. No image.

<telerik:RadStyleSheetManager 
ID="RadStyleSheetManager1" runat="server">
            <StyleSheets>
                <telerik:StyleSheetReference IsCommonCss="true" Path="~/css/MySkin/Button.MySkin.css" />
            </StyleSheets>
        </telerik:RadStyleSheetManager>

I set the background in the css to just be a solid color and it shows up. So it looks like it's accessing the css and loading it correctly, but not actually loading the button image sprite. 

<add key="Telerik.Web.UI.StyleSheetFolders" value="~/css/;~/css/Common/;~/css/Telerik/; ~/css/MySkin/; " />

Is in my web.config. 

How can I use the RadStylesheetManager with my custom skin?

1 Answer, 1 is accepted

Sort by
0
Derek
Top achievements
Rank 1
answered on 26 Oct 2012, 12:02 PM
I figured out the issue, it was purely something to do with the references from the web.config

<add key="Telerik.Web.UI.StyleSheetFolders" value="~/css/;~/css/Common/;~/css/Telerik/; ~/css/MySkin/; " />

to

<add key="Telerik.Web.UI.StyleSheetFolders" value="~/css/MySkin/; " />

And it started working correctly. When I looked up in the css that was being generated I noticed that there was no button sprite being referenced and assumed that must be because of me referencing things I don't need to. I removed the unneeded references and it started working. 
Tags
Visual Style Builder
Asked by
Derek
Top achievements
Rank 1
Answers by
Derek
Top achievements
Rank 1
Share this question
or