MadnessRed Posted February 19, 2009 Share Posted February 19, 2009 Is it possible to change a div's hiegh depending on the browser? eg document.getElementById('div1').style = "height:"+window.innerHeight+"px;overflow-y:auto;" but that doesn't work for some reason? Link to comment https://forums.phpfreaks.com/topic/145912-solved-change-div-height-depending-on-browser-height/ Share on other sites More sharing options...
MadnessRed Posted February 19, 2009 Author Share Posted February 19, 2009 I have this now, but still doesn't work <script type="text/javascript"> document.getElementById('div1').style.height = (window.innerHeight * 1); </script> Link to comment https://forums.phpfreaks.com/topic/145912-solved-change-div-height-depending-on-browser-height/#findComment-766065 Share on other sites More sharing options...
MadnessRed Posted February 19, 2009 Author Share Posted February 19, 2009 sorry I am an idiot. I forgot that css want a px at the end of a height Link to comment https://forums.phpfreaks.com/topic/145912-solved-change-div-height-depending-on-browser-height/#findComment-766092 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.