Answer the question
In order to leave comments, you need to log in
How to adjust the height of the table to fit the screen on page load?
Good afternoon! I have a table with min-height: 375px;
. I need to write a function in JavaScript that, after loading the page, if there is any space after the table to the end of the page, it would add this space to 375 and stretch the table, but so that the scrollbar does not appear.
Answer the question
In order to leave comments, you need to log in
$('#scrollArea').css("max-height", $(document).height() - $('#scrollArea').offset().top - 20);
$(document).ready(function{
$('.myclass').css("height", $(document).height());
})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question