Monday 10 February 2014

Hide Web Part Headers with SharePoint 2010 and SharePoint 2013

Hide Web Part header in SharePoint 2010


1. Add a content editor web part to your page.
2. Edit the Web Part
3. Click in the content area of the web part, click HTML and select Edit HTML Source
4. Put the following code in the web part:

  1. <style>
  2. TR.ms-viewheadertr > TH.ms-vh2 {
  3. display: none
  4. }
  5. </style>

5. Click OK
6. Expand Appearance (on the right side of the page)
7. Set the chrome type to None
8. Click OK and then save and check in your page.

Hide Web Part header in SharePoint 2013


1. Add a Script editor web part to your page.
2. Edit the Web Part
3. Click in the content area of the web part, click "Edit SNIPPET"
4. Put the following code in the web part:

  1. <style>
  2. tr.ms-viewheadertr {
  3. display: none
  4. }
  5. </style>

5. Click Insert button
6. Click OK and then save and check in your page.


The headers of your web part should now be hidden. This can be extremely helpful when your page contains a web part using boxed for your style when creating a list view. The only downside to this approach is if you have multiple web parts on a single page, it will hide the headers for all the web parts on your site.




No comments:

Post a Comment