The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Scrolling + META + CSS + BUG Reply To: Scrolling + META + CSS + BUG


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:

<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"; 

Note: I will follow your suggestion and I will test the use of “padding” and “margin”.
I have not thought about it.