[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Background on masterpage and in ContentPlace holder diffrent

Posted on 2008-09-30
5
Medium Priority
?
375 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 16

Expert Comment

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

Author Comment

by:HawaiiDragon
ID: 22607133
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 2000 total points
ID: 22607304
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
ID: 31501601
thankx  my problem with solution.... I misspelled a contentPHaceholder LOL thank you so much.
0
 
LVL 16

Expert Comment

by:Gyanendra Singh
ID: 22607683
your welcome
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

649 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