<div id="description">
  <h2>Приклад 2</h2>
  <p>Маємо два однакових елементи, але один з них має більшу ширину через використання функції max().</p>
</div>

<div id="result">
  <div class="container">
    <div class="box"></div>
    <div class="box max"></div>
  </div>
</div>
#description {
  background-color: lightgray;
  padding: 20px;
  font-family: Arial, sans-serif;
}

#result {
  display: flex;
  justify-content: center;
}

.container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
}

.box {
  width: 100px;
  height: 100px;
  background-color: blue;
  margin-right: 20px;
}

.box.max {
  width: max(150px, 200px);
  background-color: red;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.