Monday 5 September 2011

SharePoint 2010 Tips and Tricks with CSS

  1. Edit 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 to the content editor web part if you need to apply all the four customizations mentioned below OR pick and choose according to your requirement
<style>
/*--------Hide the columns--------*/
.ms-viewheadertr { 
    display: none;
}
/*---------Hide the Add Document option-------*/
.ms-addnew { 
    display: none;
}
/*---------Remove the new image icon on newly added documents-------*/
IMG.ms-newgif {
    display:none;
}
/*---------Hide the web part selection checkbox------*/
.ms-WPHeaderTdSelection
{
display: none;
}
</style>

Note: If you need to apply these settings to complete site then you should add it to a css document and reference that document in your master page

Hide the “New” icon on newly added documents in document library
Before:
clip_image002

After:


clip_image004
Hide the “Add document” link on a SharePoint document library
Before:
clip_image006

After:


clip_image008
Hide the “Columns” in SharePoint document library
Before:
clip_image010
After:
clip_image012
Hide the “selection” checkbox
Before:

After:


clip_image016

No comments:

Post a Comment