Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 7025

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 2162

Deprecated: Hook imagify_allow_picture_tags_for_webp is deprecated since version 2.2! Use imagify_allow_picture_tags_for_nextgen instead. in /www/collab365_296/public/wp-includes/functions.php on line 5758
3 awesome CSS tips you can use in your SharePoint Online sites in minutes - Collab365
Deprecated: strstr(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1145

Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1152

Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1155

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1162

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1165

Deprecated: strstr(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1145

Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1152

Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1155

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1162

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1165

Warning: Undefined array key "url" in /www/collab365_296/public/wp-content/plugins/thrive-visual-editor/thrive-dashboard/inc/smart-site/classes/class-tvd-smart-shortcodes.php on line 85

2015-05-28

I am a SharePoint architect\developer currently employed by a global manufacturing company that has close to 10k SharePoint online users.  We are 100% in the cloud with Office 365 and do not have any on prem SharePoint servers.  I often get asked how to “spruce” up the look of team and project sites. Here are a few simple pieces of code that can be added to sites to improve the overall look.  These are very easy to modify by users without any coding experience.

1. Change the background color and font of web part headers:

  • Edit your page and add a script editor
  • Copy and paste any of these snippets into the script editor.  If you want to use multiple, start with <style type=”text/css”> and end with </style>
<style type="text/css">
    .ms-webpart-titleText.ms-webpart-titleText,
    .ms-webpart-titleText > a {
        background-color: black;
        /* changes the background color of the web part header.  Hex too! #000000 */
        
        font-size: 20px;
        /* Font Size */
        
        font-weight: bold;
        /* Font bold, italics, */
        
        color: white;
        /*Font color */
        
        padding: 5px 5px;
        /*padding around fonts */
    }
</style>

2. Remove the Edit Links from the global navigation so users cannot edit the links

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

3. Add a background Image to a Content Editor webpart.  This allows the user to put text or buttons in front of an image to dramatically improve the look of the site.

  • Add a CEWP to your Page and use F12 dev tools in IE or Firebug in Firefox to retrieve the ID of the webpart.  It should look something like WebPartWPQ2.
  • Add a Script Editor WebPart to your page with the following code
<style type="text/css">
    #WebPartWPQ3 {
        background-image: url(https://server/path to image/image_name.png);
        /* path to image saved in ShPoint */
        
        background-size: 100% 100%;
        /* Sets the background image to the full size of the webpart */
        
        background-repeat: no-repeat;
        /* Only show one image, delete this line to show repeating */
        
        padding: 5px 0px 0px 15px;
        /* Add padding if needed to any of the sides of the webpart */
        
        background-position: right top;
        /* move background image to right top of the wp, to center delete this line */
    }
</style>

 

 

(Visited 3,622 times, 1 visits today)

About the author 

Jerry Ober

Summit Bundle

Get 200+ hours of Microsoft 365 Training for 27$!

Master Office 365, Power Platform & SharePoint & Teams With 200+ Hours Of Training Videos and 108 Ebooks in the Collab365 Academy. This offer is insane and is only available for a limited period.