1

i want to keep my footer at bottom in every child page.

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

</asp:ContentPlaceHolder>

<div class="footer">
footer content
</div>
Sesuraj
  • 37
  • 2
  • 3
  • 7
  • Here you could find a good collection of sticky footers: http://stackoverflow.com/questions/18469262/position-footer-at-bottom-of-page-having-fixed-header – Hashem Qolami Sep 22 '14 at 11:20

3 Answers3

4

You just need to add the following CSS to the footer:

position: absolute;
bottom: 0;
galdin
  • 12,411
  • 7
  • 56
  • 71
3

Yau can put ContentPlaceHolder inside a div and set its min-height as per your requirement:

  <div style="min-height:500px;">
   <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
    </asp:ContentPlaceHolder>
  </div>

It will occupy min-height whether there is data on content page or not.

Pawan
  • 1,704
  • 1
  • 16
  • 37
0
html,
body {
margin:0;
padding:0;
height:100%;
}
#wrapper {
min-height:100%;
position:relative;
}
#header {
padding:10px;
background:#5ee;
}
#content {
padding:10px;
padding-bottom:80px; /* Height of the footer element */
}
#footer {
width:100%;
height:80px;
position:absolute;
bottom:0;
left:0;
background:#ee5;
}
redIntent
  • 134
  • 5