View on GitHub qJake's

Tidbits

Bits of development knowledge from experience and headache.

Make an HTML Container Full-Height

Posted on: Thursday, January 7, 2016

Simply set the height of the container to the height of the window (viewport), and wrap it in the window.resize event.

$(window).resize(function()
{
    $('.full-height').height($(window).height());
});

// Fire the event so the container's height is set on page load
$(window).resize();