Home › Forums › CSS › Scrolling + META + CSS + BUG › Reply To: Scrolling + META + CSS + BUG
June 14, 2016 at 7:40 pm
#242871
Participant
I tried to do that.
I created a DIV that received the height via a variable in javascript.
I even put CSS animations via javascript to smooth resizing the Viewport because the address bar.
But I could not solve the problem.
Here’s my code:
javascript:
<script type="text/javascript">
function DivAltura(id) {
var stage = window.innerHeight
|| document.documentElement.clientHeight
|| document.body.clientHeight;
document.getElementById("blocoLivre").style.height = stage+"px";
document.getElementById("blocoLivre").style.WebkitTransition = "all 0.2s"; // Code for Safari 3.1 to 6.0
document.getElementById("blocoLivre").style.transition = "all 0.2s";
}
</script>
Note: I will follow your suggestion and I will test the use of “padding” and “margin”.
I have not thought about it.