title: Want a Smooth Animation When Resizing DIV - JavaScript
body: <p>When I am hovering over a DIV, it increases in both height and width but I have no idea how to make it animate smoother instead of resize all at once</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function chg()
  {
    document.getElementById("d1").innerHTML="Great Job!";
    document.getElementById("d1").style.width="300px";
    document.getElementById("d1").style.height="200px";
  }
  
  function chg2()
  {
    document.getElementById("d1").innerHTML="Hover Over Me!";
    document.getElementById("d1").style.width="230px";
    document.getElementById("d1").style.height="160px";
  }</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>div
  {
    background-color:RGB(177,0,0);
    color:white;
    font-size:large;
    height:160px;
    width:230px;
    text-align:center;
    line-height:150px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;body&gt;
  &lt;div onmouseover="chg()" onmouseout="chg2()" id="d1"&gt;Hover Over Me!&lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>