Wednesday, August 8, 2018

CSS for SharePoint Admins

Design

WebGradients
https://webgradients.com/
Free Fonts
http://iamvdo.me/en/blog/css-font-metrics-line-height-and-vertical-align

Admin


So you want to control what SharePoint displays on one SharePoint page.   CSS is the way to go.  But the CSS learning curve can be steep.  So here is a quick way for SharePoint Admins to add or remove functionallity.
MVP Mike Smith
http://techtrainingnotes.blogspot.com/2012/05/adding-javascript-and-css-to-sharepoint.html

Hide Approve / Reject Workflow Buttons

http://www.enjoysharepoint.com/Articles/Details/how-to-hide-approve-reject-workflow-approval-button-from-ribbon-22062.aspx

Columns Headers

Remove the column headers (Student and Grade ) from this list

First you need to edit the page and insert a content editor web part to your page.  You can put it anywhere on the page but the bottom will cause less issues.

Now edit Content Editor Web Part

image

image

image

Click “Click here to add new content” and select Edit Source from the ribbon
  
Copy and paste the CSS code from below into the HTML Source box.
Note even more CSS in the CSS Reference at the end of the article.
<style>
.ms-viewheadertr { display: none;}
</style>

Under Appearance Set Chrome Type to None
Click OK to save your webpart settings and save your page


If you want to remove everything …
Under List Views, set Toolbar Type to No Toolbar and under Appearance set Chrome Type to None.

App Part After Everything Removed


Security

Two ways - Prevent non-owners/designers editing the web part – thx Mike
1) For just that one web part, go to Modify Shared Web Part, expand the Advanced section and uncheckmark "Allow Editing in Personal View".
2) Modify the Permission Levels (or preferred: create new permission levels) that do not have "Manage Personal Views" checked.

https://social.msdn.microsoft.com/Forums/sharepoint/en-US/51964008-84bd-4880-9d9e-1e81a1897cc1/how-to-set-permissions-on-a-content-editor-web-part?forum=sharepointcustomizationlegacy

Extras

Now export your Content Editor Web Part and Save as a unique name such as … “Content Editor Web Part – Remove Columns Headers”

Import and add new webpart as needed.  (Note: dwp file extenstion)

SharePoint Site Admin
CSS Reference

Heather Soloman’s CSS Reference
https://sharepointexperience.com/about/resources/
https://web.archive.org/web/20170721180019/http://blog.sharepointexperience.com/2015/03/just-the-essentials-sharepoint-master-pages-2013

Modify Navigation Bar in SharePoint 2016

https://sharepoint.stackexchange.com/questions/207531/removing-the-word-sharepoint-from-top-of-page-in-sharepoint-2016
https://social.technet.microsoft.com/Forums/en-US/cd71eb61-b7b8-4bad-8fd8-c23cff25e898/remove-sites-link-from-suitebar?forum=SP2016
https://sharepoint.stackexchange.com/questions/217044/change-sharepoint-2016-site-header/217291

Remove Workflow in Ribbon

<style type="text/css">
a[id="Ribbon.Tasks.Workflow.Moderate-Large"]
{
display:none;
}           
</style>


Remove Column Headers from Lists

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

3 comments:

  1. Nice Blog, best microsoft office deals for Mac Home and Business edition is a powerful suite which fulfils the productivity applications, written for Mac OS X.

    ReplyDelete
  2. microsoft office 2010 professional (Retail License this specialised and efficient tool to enhance business productivity in a quick and easy way. Get your favourite applications to be downloaded absolutely free, which includes Word, Excel, Power-point, One-note, Outlook, Publisher and Access.

    ReplyDelete
  3. Nice Blog, best microsoft office deals for Mac Home and Business edition is a powerful suite which fulfils the productivity applications, written for Mac OS X.

    ReplyDelete