Search code examples
htmlbackground-imagecss

Why doesn't min-height not work on my page?


I have a gradient applied to the background of the body element. Then I have a container (right after body) that has a background .png image applied to it. The gradient always expands to at least 100% window height but the container (#body2) does not.

Any suggestions to why this doesn't work? You can inspect the HTML on my web page here: http://www.savedeth.com/parlours/


Solution

  • Screw it. Who doesn't have javascript anyways? Especially for this demographic.

    <script type="text/javascript">
    $(document).ready(function(){
    if($("body").height() < $(window).height()){
        $("body").height($(window).height());
    }
    });
    </script>