question

PhillipsKeith-1816 avatar image
0 Votes"
PhillipsKeith-1816 asked RaytheonXie-MSFT answered

SharePoint 2013 - remove view selector via css/javascript

I have a SharePoint 2013 list view that I'm "cleaning up" to display in a web part. I can remove everything else via CSS in a ScriptEdit part, but removing the view selector row requires I open "Edit web part", then click on the appropriate checkbox under Miscellaneous. However, if I've removed all the other controls/titles/etc., I also don't have the ribbon to save the page after I've turned off the view selector row. Seems like I'm in a catch-22...

Is there a way in CSS or JS to remove that view selector row, instead of using the "Edit web part" method?

sharepoint-dev
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

RaytheonXie-MSFT avatar image
1 Vote"
RaytheonXie-MSFT answered

Hi @PhillipsKeith-1816 ,
We can add the style, given below to Content Editor Web Part to achieve the hiding of the view link.

 <style>  
 .ms-pivotControl-container {  
 display:none;  
 }  
 </style>  


If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.