Archive for September, 2011

Add a background image and a CSS to page in SharePoint 2010

Adding a background image to a page in SharePoint is easy, open the page in SharePoint Designer, and add the following style inside “PlaceHolderAdditionalPageHead” content place holder.
.ms-bodyareacell {
     BACKGROUND-IMAGE: url(‘imageurl‘);


Here’s my attempt to change the page background

And of course “background-repeat” and “background-position” can be used if required.

This style can also go to a CSS file, which can be added by adding a link inside the same placeholder.

css” href=”css url” />

which will look like this

CSS can be in Style Gallery or Site Assets or anywhere else inside SharePoint or in Layouts folder in 14 hive.

If you don’t remember this link attributes and their values then in page design mode, click anywhere on the page and you will get an option to “Attach an Style Sheet” to the page in “Style” tab of the ribbon. This way it will let you browse for the CSS and will create the same link element in  the page.

If you want to add a new CSS file in “Site Assets” folder, you get an “Asset” option in the “New” ribbon group when “Site Assets” folder is selected

1 Comment

List Tools tab disappears from list page in SharePoint 2010

List pages in SharePoint contain “List Tools” tab on top of the page, and a drop down to let us select different views of the list, these are helpful function and we quickly get used to them. 

But they are taken out if another web part is added on the page, even if it’s hidden or it’s empty.

It makes sense, because  when another web part is added, the page doesn’t remain a list page anymore and all the list specific options are taken out.