title: Changing CSS properties on focus
body: <p>Is there a way to change the CSS border of a div, when an input field gets focus (e.g. when it loses focus, remove the border).</p>
  
  <p>HTML: </p>
  
  <pre><code>&lt;input type="text" name="title" id="title"&gt;&lt;/input&gt;
  &lt;div id="mainTitle"&gt;The Main Title&lt;/div&gt;
  </code></pre>
  
  <p>CSS:</p>
  
  <pre><code>#mainTitle {
      border: 1px solid #ccc; 
  }
  </code></pre>