Solved

Background on masterpage and in ContentPlace holder diffrent

Posted on 2008-09-30
5
353 Views
Last Modified: 2012-05-05
Hi guys. Trying to make the background color on my master page diffrent than the Content place holder section. Unfortunatly its all black now. I want a black background with contente place holder being white.
body {background-color:Black;

}

Open in new window

0
Comment
Question by:HawaiiDragon
  • 3
  • 2
5 Comments
 
LVL 16

Expert Comment

by:Gyanendra Singh
Comment Utility
Create one Div Tag, inside that place your contente place holder... and make background color for div tag.
0
 

Author Comment

by:HawaiiDragon
Comment Utility
not working now what do I try?
<head runat="server">

    <title>Untitled Page</title>

  

</head>

<body>

    <form id="form1" runat="server">

    <div style="text-align: center">

    <body style="background-color:Black">

        <img src="images/mainlogo.jpg" /><br /><div>

        <asp:contentplaceholder id="ContentPlaceHolder1" runat="server">

       

        </asp:contentplaceholder></div>

        <asp:Button ID="btnHome" runat="server" Text="Home" Width="92px" PostBackUrl="~/Default.aspx" />

        <asp:Button ID="tnResume" runat="server" Text="Resume" Width="92px" PostBackUrl="~/Resume.aspx" />

        <asp:Button ID="btnLinks" runat="server" Text="Links" Width="92px" PostBackUrl="~/Links.aspx" />

        <asp:Button ID="btnBlog" runat="server" Text="Blog" Width="92px" PostBackUrl="~/Blog.aspx" />

        <asp:Button ID="BtnProjects" runat="server" Text="Projects" Width="92px" PostBackUrl="~/Projects.aspx" />

        <asp:Button ID="btnAboutMe" runat="server" Text="About Me" Width="92px" PostBackUrl="~/Aboutme.aspx" /></div>

    </form>

</body>

</html>

------------------ now code in css file
 

body {background-color:Black

}

div

{background-color:White}

Open in new window

0
 
LVL 16

Accepted Solution

by:
Gyanendra Singh earned 500 total points
Comment Utility
is yr content page empty .. check that ... and fill some control on that

following code is working for me ...
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 

<html xmlns="http://www.w3.org/1999/xhtml" >

<head runat="server">

    <title>Untitled Page</title>

</head>

<body bgcolor ="black" > 

    <form id="form1" runat="server">

    <div style="background-color:White">

        <asp:contentplaceholder id="ContentPlaceHolder1" runat="server">

        </asp:contentplaceholder>

    </div>

    </form>

</body>

</html>

Open in new window

0
 

Author Closing Comment

by:HawaiiDragon
Comment Utility
thankx  my problem with solution.... I misspelled a contentPHaceholder LOL thank you so much.
0
 
LVL 16

Expert Comment

by:Gyanendra Singh
Comment Utility
your welcome
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now