Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Help to make layout 100% height Re: Help to make layout 100% height

#134877
unasAquila
Participant

first

$(document).resize(function()

needs to be

$(window).resize(function()

the problem here is that it wont be called until the window is re-sized

it is best to call it in the document ready.

$(document).ready(function() {

if ($(‘#sidebar’).height() < $(document).height()){
$(‘#sidebar’).css(‘height’, $(document).height()+’px’);
}

if ($(‘#content’).height() < $(document).height()){
$(‘#content’).css(‘height’, $(document).height()+’px’);
}

initMenus();

});