Click here to Skip to main content
15,921,382 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
problem is that i have the content place holder and also footer my i moves down the content place holder it overlapps the footer. footer does not move down.

in aspx

XML
<div id="centralArea" style="z-index: 103; left: 151px; width: 998px; position: absolute; top: 168px; height: 243px"> &nbsp;<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
       <br />
       <br />
       <br />
       <br />
           <br />
           <br />
           <br />
           <br />
           <br />
           <br />
           <br />
           <br />
        </asp:ContentPlaceHolder>
   </div>
    <!--Central Area-->
        </form>
<div id="footer" style="z-index: 106; left: -550px; position: absolute; top: -178px">

</div>


stylesheet.css



C#
#centralArea

    {
    float:left;
    width:1000px;
    min-height:348px;
    background-attachment:scroll;
}

<pre lang="cs">#footer
{
Position:relative;
Margin:700px;
width:1000px;
height:80px;
background-image:url('footer.gif');
border:1px solid black;
}


Posted
Comments
Yuri Vital 2-Jul-11 7:55am    
in yours div you have: postion:absolute
Style elements overrride class ou ID css elements.
Divs are positionned absolutely.
Best pratcies suggest to avoid absolute postion.

1 solution

Don't mix inline styles and CSS. You should separate the CSS from the actual layout.

Even though you are specifying position: relative in the CSS it is being override by the inline style and setting it to position: absolute.
 
Share this answer
 

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