Click here to Skip to main content
16,004,564 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi guys

I have a problem with my div below
"
XML
<div style="Position:relative; top:120px;left:200px;background-color:Black; ">

</div>

"
It is not visible when i put it on my default.aspx page,it seems like its covered by another div inside master page, What might be the problem here??


Below is my Default.aspx page

XML
<%@ Page Language="C#" MasterPageFile="~/MasterPg.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>


<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
   <form runat="server">
   <div style="Position:relative; top:120px;left:200px;background-color:Black; ">

   </div>
   </form>
</asp:Content>



Below is my master page

XML
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPg.master.cs" Inherits="MasterPg" %>

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

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <link href="AMSStyle.css" rel="stylesheet" type="text/css" />
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title></title>

</head>
<body>

      <asp:ContentPlaceHolder id="head" runat="server">
    </asp:ContentPlaceHolder>

        <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
        <div id="main">

<div class="sideBar";>
<div class="menu" id="mainnav">Scheduling
<a href="#"><img src="images/icon02Sched.png"/><br>Create Appointment</br></a>
<a href="#"><img src="images/VScheduling.png"/><br>View Appointment</br></a>
<a href="#"><img src="images/remindr_icon.jpg"/><br>Set Reminder</br></a>
</div>

<div class="menu" id="mainnav">Monitoring
<a href="http://www.nmmu.com" target="_self"><img src="images/calSche.jpg"/><br>Create Health Record</br></a>
<a href="#"><img src="images/ViewSche.jpg"/><br>View Health Record</br></a>

</div>
 </div>
<div class="cont_top"></div>


<!-- content -->
<div id="content">

     <div class="loggo1"></div>
</div>
<!-- /content -->


<div class="cont_bot"></div><!--Bottom round corners-->

<div class="footer1"><h3>&copy;<a href="#">2011 AMSystem</a> | <a href="#">webmaster</a> | <a href="#">Privacy</a></h3></div>

  </div>
        </asp:ContentPlaceHolder>

</body>
</html>
Posted
Updated 30-May-11 2:07am
v2

1 solution

Set dimensions, height and width, for your div
 
Share this answer
 
Comments
Anele Ngqandu 30-May-11 8:05am    
K thanks...Now my div is long and crossing the page, The problem now part of the div seems like is covered by another div from my master page. how can i put my div on top of that one from the master page?
Timberbird 30-May-11 8:14am    
Try setting "z-index:1" (or greater, till it comes on top) in your div's style attribute
Anele Ngqandu 30-May-11 9:26am    
cool thanx it worx

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900