Recent

Customizing web part display

Using a css file you can customize how the web and app parts look on a page.  Take a look at the examples on this page, then you can download and use or customize the included css files.

web-part-background-gray.css

This file adds a dark blue background to the web/app part title and a light gray background to the web/app part body.
web-app-part-customization-1

web-part-header-gray.css

This file adds a dark blue background to the web/app part title and a light gray background to the web/app part body.
web-app-part-customization-2

web-part-header-and-body-blue.css

This file adds a dark blue background to the web/app part title and a light gray background to the web/app part body.
web-app-part-customization-3

App icons next to Title

Web/App parts have an advanced property called ‘Title Icon Image Url’, this allows you to add an image to your webpart title.  Then SharePoint already has icons for each app type in the layouts images folder which you can use for these icons.
web-app-part-customization-4

To add an app icon:
1. Edit the page, select the Edit Web Part option.

2.  Expand the Advanced section in the web part properties, paste in the icon URL to the ‘Title Icon Image URL’ field.
web-app-part-customization-5
Icon URL examples:
Library: /_layouts/15/images/ltdl.png
Discussion Board: /_layouts/15/images/ltdisc.png
Tasks: /_layouts/15/images/lttask.png
Contact: /_layouts/15/images/ltcontct.png
List: /_layouts/15/images/ltgen.png

For a complete list of existing SharePoint App icons with a screenshot of each icon please see the App Icon Urls post.

Downloading and using the css files

1. Download the zip file which contains the 5 css files:
web-app-part-styling.zip

2. Select which one of the css files you want to use.

3. Upload that css file to the sites ‘Site Assets’ library
web-app-part-customization-7

Apply the styling to all pages in the site

If you have Full Control permissions or higher on a site and the site has the ‘SharePoint Server Publishing’ feature activated you can apply a css files styling to the entire site.

A. Go to Site Settings > Master page (under Look and Feel section)
web-app-part-customization-8

B. Expand the Alternate CSS URL section, paste in the path to your css file in the Site Assets library.
web-app-part-customization-9

Apply the styling to a single page

You can also apply a css files styling to just a single page by pasting a link reference into the Script Editor webpart.

 

A. Add a Script Editor to the page.  So first go to the page and edit the page.

B. At the bottom of the page, add a script editor webpart.
web-app-part-customization-10

C.  Edit the Web part (this will display the Edit Snippet option), click on the EDIT SNIPPET option.

D. Paste in a link reference to the css file in the Site Assets library.  The format of the link reference is included in the screenshot below, you can either use the full path to the file or ../SiteAssets/filename.

Click Insert to save the Script Editor webpart.
web-app-part-customization-11

Your page should now be styled as whatever css styling file you referenced:
web-app-part-customization-3

 

 

 

 

About Nick Hurst (84 Articles)
SharePoint and Nintex developer who strives to find easy to deploy and maintain solutions for business problems.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: