Saturday, December 8, 2012

Trick to Customize/Hide the default CSS Styles in Page for SharePoint

1st Option:

Reference: http://www.dhirendrayadav.com/2011/08/sharepoint-2010-tips-and-tricks-with.html

1. Click Edit the Page on the page where you need to apply the styles.
2. Add a “Content Editor" web part on the page and make it hidden.
3. Add the following code to the content editor web part (Edit HTML) where necessary.

01<style>
02/*--------Hide the columns--------*/
03.ms-viewheadertr {
04    displaynone;
05}
06/*---------Hide the Add Document option-------*/
07.ms-addnew {
08    displaynone;
09}
10/*---------Remove the new image icon on newly added documents-------*/
11IMG.ms-newgif {
12    display:none;
13}
14/*---------Hide the web part selection checkbox------*/
15.ms-WPHeaderTdSelection
16{
17displaynone;
18}
19</style>

Note: If you want to set this settings for a whole sites, you should set this settings at your site CSS file.

2nd Option:

1. Open Windows Power Shell (SharePoint Server)
2. Add this command:
stsadm -o setproperty -pn days-to-show-new-icon -pv 42

No comments:

Post a Comment