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
  • 15,944
  • 193
  • 67
  • 96
user3870112
  • 301
  • 3
  • 18

1 Answers1

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

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

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

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