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>
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>
You just need to add the following CSS to the footer:
position: absolute;
bottom: 0;
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.
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;
}