SharePoint 2007 Register Style Sheet for Custom WebPart
Here's the scenario: I created a Visual WebPart in VS 2010, removed the 2010 references and deployed the package to SP2007. Everything works fine, however I am unable to register the custom .css. (it does not style the webpart). I have exhausted Google and tried every option I could find or think of (both in ASP & C#), however I am unsuccessful. How can I link or register a style sheet located in the Style Library? This is what I am trying to create in SP2007 - works fine in 2010: <SharePoint:CssRegistrationID="CssRegistration1"name="<%$SPUrl:~sitecollection/Style Library/css/ui-darkness/jquery-ui-1.8.20.custom.css %>"After="corev4.css"runat="server"/> Any help would be GREATLY appreciated! Thanks & have a great weekend!
June 8th, 2012 3:18pm

Hi _Shu, So, In your case is only for SharePoint 2010, In SharePoint 2007, it is should be like the following. <SharePoint:CSSRegistration name="/Style Library/styles.css" After="corev4.css" runat="server" /> Or <link href="/Style%20Library/customstyles.css" rel="stylesheet" type="text/css" /> you can refer to the following link. http://fitandfinish.ironworks.com/2010/01/the-best-way-to-add-custom-css-to-sharepoint.html Thanks, Jack
Free Windows Admin Tool Kit Click here and download it now
June 13th, 2012 3:27am

Hi _Shu, So, In your case is only for SharePoint 2010, In SharePoint 2007, it is should be like the following. <SharePoint:CSSRegistration name="/Style Library/styles.css" After="corev4.css" runat="server" /> Or <link href="/Style%20Library/customstyles.css" rel="stylesheet" type="text/css" /> you can refer to the following link. http://fitandfinish.ironworks.com/2010/01/the-best-way-to-add-custom-css-to-sharepoint.html Thanks, Jack
June 13th, 2012 3:27am

Hi _Shu, So, In your case is only for SharePoint 2010, In SharePoint 2007, it is should be like the following. <SharePoint:CSSRegistration name="/Style Library/styles.css" After="corev4.css" runat="server" /> Or <link href="/Style%20Library/customstyles.css" rel="stylesheet" type="text/css" /> you can refer to the following link. http://fitandfinish.ironworks.com/2010/01/the-best-way-to-add-custom-css-to-sharepoint.html Thanks, Jack
Free Windows Admin Tool Kit Click here and download it now
June 13th, 2012 3:27am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics