<div class="container">
  <select id="select">
    <option value="min-content">min-content</option>
    <option value="max-content">max-content</option>
    <option value="fit-content" selected>fit-content</option>
  </select> 
  <div class="text-wrapper">
    <p class="text">We build modern websites & apps</p>
  </div>
  <div class="text-wrapper">
    <p class="text">Maximize your business potential with performant websites built with the latest, innovative technologies.</p>
  </div>
</div>

<a href="https://www.youtube.com/watch?v=Pm-RLTwNDGA" class="source-link">  
  <svg width="30" viewBox="0 67.39 461 326.22"><path d="M365.257 67.393H95.744C42.866 67.393 0 110.259 0 163.137v134.728c0 52.878 42.866 95.744 95.744 95.744h269.513c52.878 0 95.744-42.866 95.744-95.744V163.137c0-52.878-42.866-95.744-95.744-95.744zm-64.751 169.663-126.06 60.123c-3.359 1.602-7.239-.847-7.239-4.568V168.607c0-3.774 3.982-6.22 7.348-4.514l126.06 63.881c3.748 1.899 3.683 7.274-.109 9.082z" style="fill:#f61c0d"/></svg>
  Watch the tutorial
</a>
html {
  box-sizing: border-box;
  scroll-behavior: smooth;
  color-scheme: dark;
}

@media (prefers-reduced-motion) {
  html {
    scroll-behavior: none;
  }
}

html *,
html *::after,
html *::before {
  box-sizing: inherit;
}

body {
  display: grid;
  place-items: center;
  --text-color: #f5f5f5;
  --text-color-2: #616161;
  --bg-color: #0F0620;
  --border-color: #381D6A;
  margin: 0;
  min-height: 100vh;
  background-color: #100818;
  font: 150%/1.6 'Open Sans', sans-serif;
  color: var(--text-color);
}

.container {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

#select {
  padding: 5px 8px;
  align-self: center;
  font: 100%/1.6 'Open Sans', sans-serif;
}

.text-wrapper {
  border: 2px dashed var(--text-color-2);
  max-width: 420px;
  margin-inline: auto;
  padding: 10px;
}

.text {
  color: #eee;
  font: 100%/1.6 'Open Sans', sans-serif;
  margin: 0;
}

.source-link {
  position: fixed;
  right: 32px;
  bottom: 32px;  
  width: fit-content;
  box-sizing: border-box;
  font-size: 16px;
  display: flex;
  padding: 0.75em 1em 0.75em 0.75em;
  justify-content: center;
  align-items: center;
  gap: 0.5em;
  border-radius: 128px;
  background: linear-gradient(270deg, #AFE8EF 0%, #E7E1FA 100%);
  color: #000;
  text-align: center;
  font-style: normal;
  font-weight: 400;
  line-height: 150%;
  text-decoration: none;
}

.source-link svg {
  display: block;
  width: 1.5em;
  height: 1.5em;
  border-radius: 0.25em;
}

.source-link.source-link--second {
  right: auto;
  left: 32px;
}
let text = document.querySelectorAll('.text');
let select = document.querySelector('#select');

select.addEventListener("change", function (e) {
  text.forEach(element => {
    element.style.width = e.target.value;        
  });
}); 

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.