Exemplu: 3 blocuri într-un container Flexbox

Element 1
Element 2
Element 3

Codul sursă:

<!DOCTYPE html>
<html lang="ro">
<head>
  <meta charset="UTF-8">
  <title>Exemplu Flexbox</title>
  <style>
    body {
      font-family: Calibri, sans-serif;
      font-size: 14px;
      background-color: #FFF3CD;
      padding: 20px;
    }
    .container {
      display: flex;
      gap: 20px;
      justify-content: space-around;
      align-items: center;
      background-color: #f0f0f0;
      padding: 20px;
      flex-wrap: wrap;
    }
    .item {
      background-color: #CC0000;
      color: white;
      padding: 20px;
      font-weight: bold;      
      border-radius: 10px;
      flex: 1 1 100px;
      text-align: center;
    }
  </style>
</head>
<body>

  <h2>Exemplu: 3 blocuri într-un container Flexbox</h2>

  <div class="container">
    <div class="item">Element 1</div>
    <div class="item">Element 2</div>
    <div class="item">Element 3</div>
  </div>

</body>
</html>