I have a div element:
<div class="page">
//some contents
</div>
CSS:
.page{
bottom: 0;
color: #1f1f21;
font-size: 17px;
font-weight: 400;
left: 0;
overflow: visible;
position: absolute;
right: 0;
top: 0;
}
Getting screen height with JavaScript:
var page_height = screen.height;
alert(page_height);
How can I apply this page_height
value to my .page
class?
(i.e) I need to set screen height to my page
class
For example, if screen.height = 405
I need to add height property
height: 405px;