Sunday, March 7, 2010

Hide column header in a SharePoint list web part

I was working on a site today and I added a list web part to the site. I wanted the information to be displayed in two columns so I created a new view using "Boxed, no labels" as the style for the view. The only problems was the column headers that end up at the top that really don't make any sense or line up with anything.

To remove these annoying headers I used a simple content editor web part. Instead of using the rich text editor, open up the Source editor and enter the following three lines:view source

print?


<style>

.ms-viewheadertr { display: none;}

</style>

Under Layout in the Content Editor Web Part check the "Hidden" check box so you're web part wont' be seen on your site and click OK. The column headers will now be hidden from view.


This method can also be used to hide and/or change the look of other aspects of your SharePoint site without using SharePoint Designer or making any custom modifications. Any change can easily be undone or changed by going into Page Edit mode and changing the source in the web part.

0 comments: