title: Make each square in a grid change color on hover with CSS
body: <p>I created a grid of gray squares using CSS. I want them all to turn black when I hover over any of the squares. My current solution will only turn the square over which I hover black. Can I do this using just CSS? I imagine it will involve using spans. Below is the code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.square {
    background-color: #737373;
    float: left;
    position: relative;
    width: 30%;
    padding-bottom: 30.66%;
    margin: 1.66%;
  }
  .square:hover {
    background-color: black;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="square"&gt;&lt;/div&gt;
  &lt;div class="square"&gt;&lt;/div&gt;
  &lt;div class="square"&gt;&lt;/div&gt;
  &lt;div class="square"&gt;&lt;/div&gt;
  &lt;div class="square"&gt;&lt;/div&gt;
  &lt;div class="square"&gt;&lt;/div&gt;
  &lt;div class="square"&gt;&lt;/div&gt;
  &lt;div class="square"&gt;&lt;/div&gt;
  &lt;div class="square"&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>