Created
March 11, 2014 01:52
-
-
Save fazlurr/8d1bc73b766fd89840f2 to your computer and use it in GitHub Desktop.
A quick, non-elegant but working standalone solution with inline CSS and no jQuery requirements. AFAIK it works from IE9 too.
from : http://stackoverflow.com/questions/11868474/how-to-make-the-web-page-height-to-fit-screen-height
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<body style="overflow:hidden; margin:0"> | |
<form id="form1" runat="server"> | |
<div id="main" style="background-color:red"> | |
<div id="content"> | |
</div> | |
<div id="footer"> | |
</div> | |
</div> | |
</form> | |
<script language="javascript"> | |
function autoResizeDiv() | |
{ | |
document.getElementById('main').style.height = window.innerHeight +'px'; | |
} | |
window.onresize = autoResizeDiv; | |
autoResizeDiv(); | |
</script> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment