0

My previous question was closed. I want to have a master page with fixed width. I tried to set the margins for the master page as follows,

/*css*/
body 
{
  margin-left:50px;
  margin-right:50px;
}

After this, the sharepoint site displays the margin in the left but not the right margin. I want my sharepoint site to look like these http://healthvermont.gov/enviro/asbestos/index.aspx and http://www.choosemyplate.gov/myplate/index.aspx .

Like http://sharepoint.stackexchange.com: Empty spaces on the left and right side and content (including) in the middle.

1 Answer 1

2

Tom Wilson has a great blog post about how to accomplish this: http://styledpoint.com/blog/fixed-width-centered-aligned-sharepoint-2010-site-updated/

He gives a bunch of examples of how to make this work, but the basic example is:

#s4-bodyContainer {
width: 950px !important;
margin-left:auto;
margin-right:auto;
}
3
  • it actually does the job perfectly. But site actions ribbon is still fills the browser. Is there anyway we can shrink that too? and How can I set the color to gray in the margins?
    – Gravity M
    Commented Feb 22, 2013 at 19:50
  • For the site actions, the article has a jQuery solution. For the gray color, you would need to set the background color of the body to the gray color and then the background color of the bodycontainer class to white. Commented Feb 22, 2013 at 19:54
  • Got it. Worked perfectly.
    – Gravity M
    Commented Feb 22, 2013 at 20:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.