title: The Floating Effect - Issues with my code
body: <p>I couldn't make the divs &quot;float&quot; when hovering. Everything moves with It. I tried to create a separate div just for the boxes I wanted to see floating, but It didn't fix It, so I ended up removing It. What's wrong with my code? I added the box-shadow effect but without the boxes moving up a little bit It looks kinda bland.</p>
  <p><strong>HTML</strong></p>
  <pre><code>&lt;!-- Valor Pago --&gt;
      &lt;div class=&quot;flex-container&quot;&gt;
          &lt;div class=&quot;row&quot;&gt;
              &lt;p&gt;Valor Pago:&lt;/p&gt;
              &lt;!-- Texto --&gt;
              &lt;input type=&quot;text&quot; size=&quot;35&quot;&gt;
              &lt;!-- Botão --&gt;
              &lt;div class=&quot;botao&quot;&gt;
                  &lt;button size=&quot;20&quot; onclick=&quot;valor1()&quot; id=&quot;botao&quot;&gt;Definir&lt;/button&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;!-- Custo do Produto --&gt;
      &lt;div class=&quot;flex-container&quot; id=&quot;custo&quot;&gt;
          &lt;div class=&quot;row&quot;&gt;
              &lt;p&gt;Custo do Produto:&lt;/p&gt;
              &lt;input type=&quot;text&quot; size=&quot;50&quot;&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;!-- Troco --&gt;
      &lt;div class=&quot;flex-container&quot; id=&quot;troco&quot;&gt;
          &lt;div class=&quot;row&quot;&gt;
              &lt;p&gt;Troco:&lt;/p&gt;
              &lt;input type=&quot;text&quot; size=&quot;50&quot;&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  <p><strong>CSS</strong></p>
  <pre><code>/* Corpo */
  body {
      margin: 0 auto;
      padding: 0;
      text-align: center;
      font-family: 'DotGothic16', sans-serif;
  }
  
  /* Primeiro container (determinando também algumas características dos outros) */
  .flex-container {
      display: flex;
      background-image: linear-gradient(rgb(49, 117, 218), rgb(0, 0, 107));
      border-bottom: 2px solid #f1f1f1;
  }
  
  /* Caixas que contém o texto (dentro dos containers): Valor Pago, Custo do Produto e Troco */
  .flex-container &gt; div {
      background-color: #f1f1f1;
      border-radius: 10px;
      margin: 24px;
      padding: 15px;
      font-size: 22px;
      box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
      transition: ease-in 0.5s;
  }
  
  /* Hover das caixas dentro dos containers */
  .flex-container &gt; div:hover {
      background-color: #cac9c9;
      transition: ease-out 0.2s;
      box-shadow: 15px 15px 15px rgba(0, 0, 0, 0.5);
      margin-top: 20px;
  }
  
  /* Configuração de posição e cor do container &quot;Custo&quot; */
  #custo {
      background-image: linear-gradient( rgb(216, 0, 0), #570000);
      justify-content: center;
  }
  
  /* Configuração de posição e cor do container &quot;Troco&quot; */
  #troco {
      background-image: linear-gradient(rgb(17, 212, 82), rgb(0, 77, 0));
      justify-content: flex-end;
  }
  
  /*Configuração do div dos botões*/
  .botao {
      margin-top: 30px;
  }
  
  /* Configuração dos botões dentro dos divs */
  #botao {
      width: 80px;
      height: 30px;
      background-color: lightgray;
      border-radius: 10px;
      border: 1px solid black;
      transition: ease-in 0.2s;
      font-family:'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
      font-size: 15px;
  }
  
  /* Hover dos botões */
  #botao:hover {
      background-color: black;
      color: whitesmoke;
      transition: ease-out 0.2s;
  }
  </code></pre>