SharePoint 2010 Branding – Part Eight

This entry is part 8 of 9 in the series SharePoint 2010 Branding Series

In the last post we looked at centreing the content area including the ribbon and now we will look at how to change the scrolling back to the old method of scrolling.

In our current site we have the main content area, scrolling leaving the ribbon at the top this is fine if that’s how we want it but in our site it is meant to be a public facing site and so we would like to jump back to the traditional method of scrolling i.e. the whole page scrolls together.

To achieve this we need to take a look at the master page and find the following piece of code

body {
	height:100%;
	overflow:hidden;
	width:100%;
}

Which will sit in the Master Page in between the <head> and </head> tags.

Remove the overflow attribute completely and then add the following code to the CSS file

body #s4-workspace {
overflow:visible;
}

How does this all work? By hiding the main overflow scrolling effect from the page the workspace or our content area is effectively allowed to steal the overflow and make use of it itself if you play around with the overflow settings you can see this happen, with that said by using the code we have above this reinstates the standard scrolling and everything is good in the world.

Before

After

Exciting isn’t it? Well I don’t want this post to be uber short so let’s take a look at adding a background to the site, there’s quite a lot of white space going on in the site at the moment and the final design included a green gradient.

So where do we start, well we want the background colour to apply to the whole site so a good place try try first would be the Body as this is a standard tag and applies to the whole site.

Something like this would make sense;

body
{
	background-image:url('/SiteAssets/samworthbg.gif');
	background-color:#325e13;
	background-repeat:repeat-x;
	height:100%;
}

Here we specify a background image as well as a background colour, we tell the image to repeat across the x-axis (left to right) and give it a height of 100%, how does this translate to the page?

Seemingly fine right? Well if we scroll down a little we can see that there is still a few problems, however, never fear we will deal with this tomorrow.

If anyone out there is following along, please do have a go and see if you can figure out what is wrong.

I’ll tell you tomorrow but for now good day to you

Thanks

Matthew Hughes

About Matthew Hughes

Matthew Hughes has written 56 post in this blog.

I am a SharePoint Developer for UK based Intelligent Decisioning Ltd. Check us out id-live.com I setup SharePoint 365 as I saw that there was a need for introductory blog posts and knew there were some fantastic authors out there who might not have time to run their own blogs and keep them updated reguarly.

Series Navigation<< SharePoint 2010 Branding – Part SevenSharePoint 2010 Branding – Part Nine >>

No Comments

Trackbacks/Pingbacks

  1. Master course on Master Pages « vsimonis - [...] http://sp365.co.uk/2011/08/sharepoint-2010-branding-part-eight/ [...]

Leave a Comment

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>