title: keep HTML floating elements in place when size changed
body: <p>I have no idea how to keep the elements in place.
  When I hover over a floating element, the border is adjusted but this pushes the other elements around (the images are 300x300px). How can I keep them in place? Thanks in advance.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;link rel="stylesheet" type="text/css" href="style.css"&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;h1&gt;These are images&lt;/h1&gt;
      &lt;div id="container"&gt;
          &lt;div class="imgDiv"&gt;
              &lt;img class="img"/&gt;
              &lt;h3&gt;Click on image!&lt;/h3&gt;
          &lt;/div&gt;
  
          &lt;div class="imgDiv"&gt;
              &lt;img class="img"/&gt;
              &lt;h3&gt;Click on image!&lt;/h3&gt;
          &lt;/div&gt;
          &lt;div class="imgDiv"&gt;
              &lt;img class="img"/&gt;
              &lt;h3&gt;Click on image!&lt;/h3&gt;
          &lt;/div&gt;
          &lt;div class="imgDiv"&gt;
              &lt;img class="img"/&gt;
              &lt;h3&gt;Click on image!&lt;/h3&gt;
          &lt;/div&gt;
          &lt;div class="imgDiv"&gt;
              &lt;img class="img"/&gt;
              &lt;h3&gt;Click on image!&lt;/h3&gt;
          &lt;/div&gt;
          &lt;div class="imgDiv"&gt;
              &lt;img class="img"/&gt;
              &lt;h3&gt;Click on image!&lt;/h3&gt;
          &lt;/div&gt;
      &lt;/div&gt;    
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The style.css file is:</p>
  
  <pre><code>.imgDiv {
  float:left;
  border: 1px solid black;
  text-align:center;
  border-radius:10px;
  margin: 0px 10px 10px 0px;
  } 
  .img {
  border-radius:10px;
  } 
  .imgDiv:hover {
  border: 5px solid black;
  }
  </code></pre>