Monday, 9 September 2013

Make all divs the height of the very first div

Make all divs the height of the very first div

I am using this code
//Resize Div
$(document).ready(function(){
resizeDiv();
});
window.onresize = function(event) {
resizeDiv();
}
function resizeDiv() {
vpw = $(window).width();
vph = $(window).height();
$('.site-intro').css({'height': vph + 'px'});
}
It works great and makes the first div 100% of the window and set the
height inline. Is there a way to add to this code so it would make other
divs set to the same height?
I am placing one div on top of the other and want them all to be the same
height (that same height being what ever 100% is).

No comments:

Post a Comment