When master page parsed content div always is at the very bottom. So how i can set footer to be at the bottom while not using position absolute. If you use position absolute you have to set every different page height and footer position according to the this is which i don't want. Thank you.
2 Answers
The most practical solution is to set a min-height in your CSS of around 700px for the main content area between header and footer.
Alternatively, you could try this (but not tested yet in modern browsers):
http://codersbarn.com/post/2008/09/10/CSS-Sticky-Footer-for-ASPNET-Master-Page.aspx

- 15,108
- 7
- 50
- 91
This is something I needed to implement recently on a project. Checkout the following jsFiddle: http://jsfiddle.net/uHZgY/
Edit (Based on comment)
If what you require is a floating footer, then checkout this other SO question: How do I get a floating footer to stick to the bottom of the viewport in IE 6?.
The correct answer implements this without the need for absolute positioning of the main content.
I have taken the correct answer and created a jsFiddle for you so you can check it out.
-
the problem is when page exceeds the visible window and scroll bar appears it fails. you try and see yourself – Furkan Gözükara Sep 06 '11 at 20:13
-
Sorry, maybe I have misunderstood the question. Do you want a fixed footer (fixed at the bottom), even when the content exceeds the page height? (So content scrolls behind the fixed footer) – jdavies Sep 06 '11 at 20:19