Skip to content Skip to sidebar Skip to footer

Changing Div Height According Screen Resolution Javascript

Here is the problem. I have
I want to check user resolution and change his height according user resolution, using javascript? Javascript: window

Solution 1:

If you want set the Screen Height:

var mainNode = document.getElementById("main");
mainNode.style.height = screen.height + "px";

Screen Avail Height

Screen Height

DOMElement Client Height

Screen height is different from client height (document.documentElement.clientHeight).

Post a Comment for "Changing Div Height According Screen Resolution Javascript"