Learning SharePoint the hard way...

Sunday, August 28, 2011

SharePoint 2010 Tips and Tricks with CSS

3 comments :

While working with SharePoint projects I am sure you all would have been asked by the customers for implementing something which you would at the first place say “no” or “not possible”. But as they say the customer is always right and you need to give in to customers demand. Following are few things which I needed to implementation while working on a recent intranet portal which I would like to share with you so that it helps somebody out there.

  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_image00d2


After:



clip_image00d4

Hide the “Add document” link on a SharePoint document library

Before:

clip_image00d6


After:



clip_image00d8

Hide the “Columns” in SharePoint document library

Before:

clip_image01d0

After:

clip_image01d2

Hide the “selection” checkbox

Before:

clip_image01d4


After:



clip_image01d6

3 comments :

  1. SharePoint projects I am sure you all would have been asked by the customers for implementing something which you would at the first place say “no” or “not possible”.

    Thanks for sharing this.

    ReplyDelete
  2. SharePoint often makes new tasks which need to be loaded by new or reallocated workers, so make sure that those who are accountable for material places have unique guidelines such as protection or information top quality.

    ReplyDelete