<div class="wrapper">
  <div class="box">
    <div class="sub"></div>
  </div>
</div>

<div class="wrapper case">
  <div class="box">
    <div class="sub"></div>
  </div>
</div>
*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  min-height: 100vh;
  font-family: 'Open sans', sans-serif;
}
body {
  background: linear-gradient(50deg, #f3c680, hsla(179,54%,76%,1));
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3vh;
}

.wrapper {
  position: relative;
  min-width: 24vw;
  background: white;
  border-radius: 15px;
  padding: 3vh;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 50vh;
  margin: 1vh;
}

.box {
  display: flex;
  background: #eee;
  padding: 1rem;
  width: 100%;
}

.sub {
  width: 100px;
  min-width: 50%;
  max-width: 100%;
  background: #3c78dB;
  padding: 2rem;
}

.case .sub {
  max-width: 50%;
  min-width: 100%;
}
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.