tags:

views:

36

answers:

2

hi. i have 6 content place holder in my master page. i need to set the background color [body] for all my content place holder in my master page to light gold color. so that all my content page wil content this color[body]

how do do it

+1  A: 

You could wrap each content placeholder in a div in the master page then style each div so that the background colour is light gold.

<div class="goldcontent">
    <asp:ContentPlaceholder ID="Content1" runat="server"></asp:ContentPlaceholder>
</div>

<%-- other controls --%>

<div class="goldcontent">
    <asp:ContentPlaceholder ID="Content2" runat="server"></asp:ContentPlaceholder>
</div>

<%-- etc --%>

Then in your css file

div .goldcontent
{
    background-color: # FFD700;
}
Dave
+2  A: 

The best way would be css:

body {
    background: #FFD700;
}

As an alternative to Dave's solution, you could have a div at the top level inside your placeholders:

<asp:Content ID="first" ContentPlaceHolderID="_firstContainer" runat="server">
    <div class='content'>
        // do presentation
    </div>
</asp:Content>

With css:

.content{
    background: #FFD700;
}
Mike