How do I find the webpart ID so I can hide the column headers for a specific list webpart view? I want to use the following code in content editor...

<style type="text/css">
    .ms-viewheadertr { display:none; }

This thread relates to the same question but doesn't tell how to find the webpart ID.
How can I get rid of the columns header when the style 'Boxed' was selected?

1 Answer 1


You can get the WebPart ID using Developer Tools (F12) in Internet Explorer as the following:

  • Open your page that contains your list view via Internet Explorer > edit it.
  • Click F12 to open developer tools, Click on the Pointer icon, and catch the div with class s4-wpcell ms-webpartzone-cell ms-webpart-cell-vertical ms-fullWidth and get its ID as the following:

enter image description here

To hide the column headers,

Add the below script based on your webpart ID in Script Editor or Content Editor web part.

#MSOZoneCell_WebPartWPQ2 .ms-viewheadertr
   display: none;


No columns headers as highlighted with yellow

enter image description here

  • This worked perfect. The visual was very helpful. Thanks for your help! Jul 22, 2017 at 18:24
  • @JarrettJones Glad to hear it worked and helped you, please don't forget to Mark my answer :) it's the true sign beside my answer. Jul 22, 2017 at 20:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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