none
Changing background color of a page. RRS feed

  • Question

  • I am using a publishing site. When I create a new page (Artcle Page with summary), background of  the page is Grey which I do not like. Is there a way to change the background color – either using IE or Sahrepoint Designer 2007.

     

    Thanks a lot.

    Saturday, April 11, 2009 5:52 PM

Answers

  • Hello,

     

    Please try following method:

     

    1.       Open your article page with “Edit Page Layout” in SharePoint Designer.

    2.       Switch to code view, seek the code : <asp:Content ContentPlaceholderID="PlaceHolderMain" runat="server">

    3.       Put following code under the above tag:

    <style type="text/css">

    .ms-bodyareaframe {

                    background-color: <color you like>;

    }

    </style>

    4.       Save the change and see the effect.

     

    I’ve tested the above method without problem, the thing you should note that it actually modify one of the master page Articlelinks.aspx which controls all article pages, so all of these article pages will be affected.

     

    Regards,

    Jerry


    Xing-Bing Yu
    Tuesday, April 14, 2009 3:07 AM

All replies

  • I looked at various stype sheets (css) used by the page, but cannot figure out which one sets the background color of the page/body.

    Sunday, April 12, 2009 10:45 PM
  • For future reference you can use IE8 to check the CSS that is being used on a specific part of the site.

    another usefull tip, use firefox's Firebug to also help you on this specific matter.

    This way you can always know what is the CSS that is being used by the page.
    Ricardo Magalhães
    Monday, April 13, 2009 11:01 AM
  • Thanks. Unfortunately, I am on IE6 and cannot  change brower version or browser.

    I looked a page which uses Contenet Editor  web part and background of that is all white.
    When I look at the source code of   style sheets used, (core.css files an dother .css files) they seem to be same to artcle page,
    so some where in core.css or elsewhere stylesheet for article page and conmtenet editors etc are defined. However,
    I canot pinpoint to specific style seets used which sets background

    Really apprecaite any help.
    Monday, April 13, 2009 11:41 AM
  • Add background:#colourvalue to the body tag in your .master file or your .css file
    Monday, April 13, 2009 11:59 AM
  • The problem with changing the CSS from the Sharepoint is that you might do something you don't want, like change all site background color . . .

    So be carefull with that!!!

    Another approach is for you to use a custom CSS file only with the changes you want to have on the site, this way you can have some control in what you are doing.

    Just a quick question, is this a public site? will it be available to the internet?

    if it is, you should test it in other browsers . . .
    Ricardo Magalhães
    Monday, April 13, 2009 1:13 PM
  • you have to set the body background color to the color of your choice

    Edit your Article Page in sharepoint Designer and add the following code, and i did choose white as the Background color for the page

    body{
    background-color:#FFFFFF;
    font-family:verdana,arial,helvetica,sans-serif;
    color:#000000;
    }

    BTW check this link to modify your Article Page http://office.microsoft.com/en-us/sharepointdesigner/HA101741331033.aspx

    Best Practice is not to touch the Core.css, this will impact all your sites and create your own css file and attach to your master page or pages.

    or simply use
    <style type="text/css">

    </style>
    Block to the page you want to customize

    Hope this Helps!
    MCTS - MOSS 2007 Configuring, .NET 2.0 | SharePoint Architect | Evangelist | http://ramakrishnaraja.blogspot.com/
    Monday, April 13, 2009 1:34 PM
  • Thanks. I had tried all of this, somehow it did not change the color. I am still wondering in one or more css's this background color is defined because Content Editor Web Part alwys shows white but article page shows Grey. It is just that I cannot nail down which file/lines this information is defined.
    Monday, April 13, 2009 3:06 PM
  • try using IEDevToolBar.  You can downlowd this and then find which backgroud color you need to change. As far as I know it will work with IE6.  You can download the tool at     http://www.microsoft.com/downloads/details.aspx?familyid=e59c3964-672d-4511-bb3e-2d5e1db91038&displaylang=en   

    Thanks,
    Dave
    Monday, April 13, 2009 7:38 PM
  • Hello,

     

    Please try following method:

     

    1.       Open your article page with “Edit Page Layout” in SharePoint Designer.

    2.       Switch to code view, seek the code : <asp:Content ContentPlaceholderID="PlaceHolderMain" runat="server">

    3.       Put following code under the above tag:

    <style type="text/css">

    .ms-bodyareaframe {

                    background-color: <color you like>;

    }

    </style>

    4.       Save the change and see the effect.

     

    I’ve tested the above method without problem, the thing you should note that it actually modify one of the master page Articlelinks.aspx which controls all article pages, so all of these article pages will be affected.

     

    Regards,

    Jerry


    Xing-Bing Yu
    Tuesday, April 14, 2009 3:07 AM