Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

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.

share|improve this answer
    
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
    
Thank you, lools like that was it ) –  MaaKut Feb 15 '12 at 12:08
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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