title: OnLoad and on resize css break
body: <p>When I load my page or when I resize the browser window, the css has a load delay and the user can see the page without formatting. This is my site: <a href="http://bit.ly/MbyWss" rel="nofollow">bit.ly/MbyWss</a></p>
  
  <p>This is my code:</p>
  
  <p>My original css in html is estilos_def.css</p>
  
  <pre><code>&lt;body id="body" onresize="start();" onload="start();"&gt;
  </code></pre>
  
  <p>when body is loaded or resized i call the function start</p>
  
  <pre><code>var navWidth, navHeight;
  function start(){
  
      if (self.outerWidth != undefined)
      {
          navWidth = self.outerWidth;
          navHeight = self.outerHeight;
      } else {
          navWidth = document.documentElement.clientWidth;
          navHeight = document.documentElement.clientHeight;
      }
      //Problema com deteçao de width, resolve-o
  
      if(navWidth&gt;=1600){ //1600 - 1920
          document.getElementById("estA").href="style/estilos_ws.css"
          document.getElementById("titulo_dias").style.height= "10%";
  
      }else if(navWidth &gt; 1300 &amp;&amp; navWidth &lt;1600){ //1300 1600
          document.getElementById('estA').href="style/estilos_1920.css";
          document.getElementById("titulo_dias").style.height= "7%";
  
      }else if(navWidth &gt;= 1024 &amp;&amp; navWidth &lt;=1300){ //1024 - 1280
          document.getElementById("estA").href="style/estilos_def.css"
          document.getElementById("titulo_dias").style.height= "7%";
  
      }
      lbeats();
  
      if(navigator.appName =='Microsoft Internet Explorer')
      {
          ie();
      }
      document.getElementById("dias").style.display="none";
      document.getElementById("gal").style.display="none";
  }
  </code></pre>