1

I have a requirement to hide the New Document drop-down that appears in the SharePoint online document library ribbon. I already have a master page in place, so can someone help me with the CSS to hide the below.

enter image description here

Please note, i only want to hide the New Document from the ribbon and keep upload and New folder there for use. Thanks.

1 Answer 1

0

After some research and using developer tools, I found the ID's for New Document, Upload Document and New Folder. Please refer to the below css and you can utilize it according to your need, simply add this to your master page and it will work.

#Ribbon\.Documents\.New\.AddDocument-Large //hides upload document button
                        {
                            display:none !important;
                        }
                        #Ribbon\.Documents\.New\.NewDocument-Large //hides new document drop-down
                        {
                            display:none !important;
                        }
                        #Ribbon\.Documents\.New\.NewFolder-Large //hides the New Folder button
                        {
                            display:none !important;
                        }

Hope this helps someone.

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.