0

I want to have the body height in CSS based on the document height.

This code doesn't work:

$(document).ready(function() {

    $("body").css({"height": $(document).height() * 4 }, 300);

}); 
Unheilig
  • 16,196
  • 193
  • 68
  • 98
user3870112
  • 311
  • 3
  • 18

1 Answers1

0
$(document).ready(function() {

    var winHeight = $(window).height() * 4;

    $("body").css({"height": winHeight + "px" });

}); 
Thomas James
  • 687
  • 2
  • 6
  • 21