On my website, I didn't set a height for the html or body tags. This setup works well on pages with ample content, but when a page has insufficient content, I want the body height to be 100%.
I decided to try using jQuery to solve this issue. I came up with a snippet that I thought would work, but unfortunately it didn't do much.
if(jQuery("html").css("height") < "100%"){
jQuery("html, body").css({"height": "100%", "min-height":"100%"});
}
I suspect that jQuery may not be recognizing the body height as a percentage, perhaps only in pixels.
Your assistance would be greatly appreciated.