using Sharepoint 2010.

We have a page created with two panes. On the left side we have two lists using default display (horizontal) so its fine to have the headers displayed

[header1]  [header2]
data1        data2

On the right side, we wanted to use a vertical display so used the newsletter option. With this list, the headers appear on the left side for the newsletter, but they also appear across the top

[header10] header[11] header[12]
[header10] data10
[header11] data11
[header12] data12

Other posts have helped me find the magic code for removing headers in a list Can the Newsletter style of the standard view be modified? Which led me to: http://www.benstegink.com/hide-column-header-in-a-sharepoint-list-web-part/ However, that removes the header in all lists on the page.

Is there a way to remove the header for just one list on a page?


Use SharePoint Designer 2010 to either add a temporary CSS class [say customClass] to your Web Part and than use

 .customClass .ms-viewheadertr { display: none;} 

Or completely delete the top header table using SharePoint Designer 2010 - Design View. Once you click on any column, click Esc to get the top element.


If you are using a web part page, Arsalan's answer is about as good as you can get.

However, if you're using a Wiki page, you can do this without having to use SharePoint Designer and un-ghosting your page. Just edit the Wiki page in the browser and click within the page layout section, then go into Edit HTML Source (in the ribbon under Markup) to add the custom class to your web part, and add style as suggested by Arsalan.

Additionally, if you need to do the inverse - hide the headers on all but one of your web parts (as I did today) - you can use the custom CSS class to identify the exception instead:

<div class="ms-rtestate-read ms-rte-wpbox".../>
<div class="ms-rtestate-read ms-rte-wpbox".../>
<div class="ms-rtestate-read ms-rte-wpbox header-exception".../>
<div class="ms-rtestate-read ms-rte-wpbox".../>

  .ms-viewheadertr { display: none;} 
  .header-exception .ms-viewheadertr { display: table-row!important;}

This will hide the list headers on all web parts except for the one with the header-exception class.

To determine the proper syntax for this, I used W3Schools' reference articles on CSS Selectors and the CSS display Property, then implemented and tested it on my site collection.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.