Stephen Cioffi
Stephen Cioffi

Reputation: 1221

Set document height minus 100px

I have the following code and instead of height(300), height() = document height-100

$(".bar").height(XXX);

Upvotes: 0

Views: 3809

Answers (2)

Ram
Ram

Reputation: 144729

Try this:

var h = $(window).height() - 100;
$(".bar").height(h);

Upvotes: 1

Sina Fathieh
Sina Fathieh

Reputation: 1725

var DocHeight = $(document).height();
$(".bar").height(DocHeight-100);

Upvotes: 3

Related Questions