Click here to Skip to main content
16,016,795 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi...
We are developing a project using master page.But we dnot know how to set footer at bottom only in any page of master page.
pls help me.thank u.
Posted
Comments
jaideepsinh 2-Jul-13 7:06am    
you want to set footer at master page or on other page.
[no name] 2-Jul-13 7:10am    
In master page only,it is automatically apply to all pages.
its right na?
jaideepsinh 2-Jul-13 8:32am    
Yes.
[no name] 2-Jul-13 8:46am    
can u tel,is it possible?
farogh haider 2-Jul-13 7:11am    
Plaese explian what do you want??(Footer in all pages or only specific page)

This answer is relevant if u r in need of css that set your footer at bottom
CSS
position:absolute;
    bottom:0;
    width:100%
 
Share this answer
 
Comments
Member 10979335 29-Aug-14 18:11pm    
Absolutely worthless
try this,
XML
<div id="mainContent"style="position:relative;">
       <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
       </asp:ContentPlaceHolder>
   </div>
<br style="clear:both;" />
 <div id="footerContent" style="position:relative;">
     <br/><br/>
     <center style="font-size: small; font-style: italic; font-family: Arial">
         <a target="_new" href="/Disclaimer.html">Security and Privacy Notice</a><br/>
         ...
     </center>
 </div>
 
Share this answer
 
Hi...
finally I have find solution to set footer at bottom only on every page like in .css(using master page).
CSS
#content
{
    clear:both;
	  width: 950px;
	  position:relative;
	  min-height:330px;
}
.footer
{
    position:relative;
    height: 5em;
    margin-bottom:-5em;
    /* bottom:3px;
    z-index:05px;
    margin-top:-5em; */
    background-image:url('bg_footer111.gif');
    background-repeat:no-repeat;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
    font-weight: bold;
    color:#FFFFFF;
    left:5px;
    right:-5px;
    width: 982px;

}

thank u.Its woring fine.
 
Share this answer
 
v2
see nonverbal code of a Master page....



You should code in this manner...

HTML
<header>

</header> part....

<body>

<content placeholder>

Displays other page content here

</content placeholder >
</body> part


<footer> part...

</footer>


in this way your footer div automatically positioned at bottom
 
Share this answer
 
v3
Hi murali
Define the height for header, content place holder and footer in ur master page.Assume if the total height is 500 put the header and footer hieght as 50 and remaining height(400) apply to the content place holder.The table structure is shown below.
C#
<table height="500">
<tr height="50"><td>Header</td></tr>
<tr><td><asp:contentplaceholder ></asp:contentplaceholder></td></tr>
<tr height="50"><td>Footer</td></tr>
</table>


Thanks
Anil
 
Share this answer
 
v2
Comments
[no name] 2-Jul-13 9:20am    
Thanks Anil,It is better to previous.
+5...
Anilkumar2vvv 2-Jul-13 9:26am    
k ur problem is solved or not
[no name] 3-Jul-13 6:52am    
In html working,but i dnot how to set in .css. Pls help me anil.
Anilkumar2vvv 3-Jul-13 8:21am    
Use below css classes in your css file
.tableHeight
{
height: 500px;
}
.headerHeight
{
height: 50px;
}
.contentHeight
{
height: 400px;
}
.footerHeight
{
height: 50px;
}
Apply classes in html page:
<table class="tableHeight">
<tr class="headerHeight"><td>Header</td></tr>
<tr class="contentHeight"><td><asp:contentplaceholder ></td></tr>
<tr class="footerHeight"><td>Footer</td></tr>
</table>

Write this code just before:
 
Share this answer
 
Comments
jaideepsinh 2-Jul-13 9:10am    
For this you have to set fix div size for small content page.Or set ContentPlaceHolder size fix at master page.
Try this,

<div>
<center style="font-size:small">Footer content</center>
</div>

Use the following in your css for the footer div:

bottom:0px;
position:absolute;
 
Share this answer
 
Comments
[no name] 2-Jul-13 7:26am    
Sorry bos,its not working.

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