2
I made a one-page website and to calculate the size of the main Divs I used this JS:
function tamanhos(){
$('#a, #b, #c, #d').css('min-height', $(window).height());
}
$(window).load(tamanhos);
$(window).resize(tamanhos);
The point is that with the window
the site opens with the Divs all crushed, ai after it loads everything it puts the right size.
I have some other option to calculate the size of the Divs, but not break while the site is loading?
I want when the site opens each div to have at least the screen size. What happens now is that the Divs open all crushed and after a while they adjust to the correct size.
HTML:
<div id='conteudo'>
<div id='a'></div>
<div id='b'></div>
<div id='c'></div>
<div id='d'></div>
</div>
you cannot show html code?
– msm.oliveira
How do you want it to look? You can hide the Ivs until the content loads.
– bfavaretto
@bfavaretto edited
– Andrey Hartung