{"id":24,"date":"2012-02-01T17:01:32","date_gmt":"2012-02-01T17:01:32","guid":{"rendered":"https:\/\/sharepointhacker.com\/?p=24"},"modified":"2012-02-01T17:04:41","modified_gmt":"2012-02-01T17:04:41","slug":"calling-out-custom-css-on-a-page","status":"publish","type":"post","link":"https:\/\/sharepointhacker.com\/?p=24","title":{"rendered":"Calling out Custom CSS on a page"},"content":{"rendered":"<p>In Customizing Sharepoint I needed to call some custom CSS. In this case I needed to put a banner across the top and a custom logo.<\/p>\n<p>The easiest way I found to do this is to create some CSS for the banner which would be<\/p>\n<p>[code]<\/p>\n<p>.s4-title {<br \/>\n\u00a0\u00a0\u00a0 background: url(&#8216;Style Library\/Custom Images\/New_bgrnd.png&#8217;) no-repeat scroll right top;<br \/>\n\u00a0\u00a0\u00a0 margin: 0;<br \/>\n\u00a0\u00a0\u00a0 }<\/p>\n<p>[\/code]<\/p>\n<p>&nbsp;<\/p>\n<p>But aside from adding this to a new Content Editor Webpart\u00a0(which I did for testing) on each page I wanted to call it from a custom CSS file. To accomplish this I added the following to a copy of v4.master (because we are that lame and still use v4 out of the box). I put this in the Header Section of New_v4.master<\/p>\n<p>[code]<\/p>\n<p>&lt;SharePoint:CssRegistration name=&#8221;\/Style Library\/Custom CSS\/New_Custom.css&#8221; After=&#8221;corev4.css&#8221; runat=&#8221;server&#8221;\/&gt;<\/p>\n<p>[\/code]<\/p>\n<p>Of course I had to create the new Folder under style library called Custom CSS (this is also what I did with the images by creating a custom images folder).<\/p>\n<p>Save, checkin and publish all.<\/p>\n<p>Next change your Master page to New_v4.Master in Site Settings &#8211;&gt; Master Page to the New_v4.master<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In Customizing Sharepoint I needed to call some custom CSS. In this case I needed to put a banner across the top and a custom logo. The easiest way I found to do this is to create some CSS for the banner which would be [code] .s4-title { \u00a0\u00a0\u00a0 background: url(&#8216;Style Library\/Custom Images\/New_bgrnd.png&#8217;) no-repeat scroll [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[6,4],"tags":[50,12,9,14,13],"class_list":["post-24","post","type-post","status-publish","format-standard","hentry","category-css","category-sharepoint-2010","tag-css","tag-customizing","tag-script","tag-scripts","tag-v4"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p289k1-o","jetpack_likes_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/sharepointhacker.com\/index.php?rest_route=\/wp\/v2\/posts\/24","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sharepointhacker.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sharepointhacker.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sharepointhacker.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sharepointhacker.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=24"}],"version-history":[{"count":7,"href":"https:\/\/sharepointhacker.com\/index.php?rest_route=\/wp\/v2\/posts\/24\/revisions"}],"predecessor-version":[{"id":31,"href":"https:\/\/sharepointhacker.com\/index.php?rest_route=\/wp\/v2\/posts\/24\/revisions\/31"}],"wp:attachment":[{"href":"https:\/\/sharepointhacker.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=24"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sharepointhacker.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=24"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sharepointhacker.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=24"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}