Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

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;
}
share|improve this answer
    
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 Feb 22 '13 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. –  John Chapman Feb 22 '13 at 19:54
    
Got it. Worked perfectly. –  Gravity M Feb 22 '13 at 20:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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