I prefer to design my styles based on the height of the window, which I achieve by setting the html and body elements to a height of 100%.
html, body{
min-height: 100%;
height: 100%;
}
From there, I can customize the heights of other elements accordingly using the approach demonstrated in the jsfiddle link below. However, I encounter an issue with getting the footer to stick to the bottom. While it works fine for pages that don't extend beyond the window height, the footer becomes fixed at the bottom when they do. How can I ensure that the footer always sticks to the bottom while still utilizing the 100% height set for html and body? Notably, I tried using the wrapper method as shown here:
#wrapper{
min-height:100%;
}
However, this didn't work well because of issues with the height of child elements.
http://jsfiddle.net/mmahalwy/m4AjL/
Any suggestions?
Edit: I was able to resolve this issue by implementing the following solution: http://jsfiddle.net/mmahalwy/7wqqF/
Thank you, everyone!