2

I have a custom CSS file is in 14\TEMPLATE\LAYOUTS\MyStuff folder. Masterpage markup contains the following:

<SharePoint:CssLink runat="server" Version="4"/>
<SharePoint:Theme runat="server"/>
<SharePoint:ULSClientConfig runat="server"/>
<SharePoint:CssRegistration runat="server" Name="/_layouts/MyStuff/my_style.css" After="corev4.css"/>

The problem is that CSS links are not added to the page at all as if CssLink gets rendered to nothing. At the same time, the CSS is accessible via http://mysite/_layouts/MyStuff/my_style.css. Moreover, I have several sripts in the same folder linked to master page like this:

<SharePoint:ScriptLink runat="server" Name="/_layouts/MyStuff/thescript.js" />

and this works just fine. What am I missing?

0

Is your site running in 2007 compatibility mode by chance? If so, that Version="4" is what is preventing it from rendering as the page itself is trying to render as Version="3" and would ignore all version 4 controls.

  • Do you need the Version="4"? I don't have that at all in mine and it loads the CSS just fine. – ThatGuyYouKnow Feb 10 '12 at 20:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.