title: How to make text over an image adjust size according to browser size
body: <p>I tried to put text over an image as a banner image, but whenever I resize the browser to check whether it is responsive, the text will go pass the boundaries of the banner image. How do I make it such that when the browser is resized the text will not clip out of the image and stays centered?</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.banner {
    display: block;
    width: 100%;
  }
  
  .banner-img {
    display: block;
    width: 100%;
  }
  
  .banner-text {
    position: absolute;
    top: 30%;
    left: 25%;
    font-size: 70px;
    color: aliceblue;
    font-family: 'Merriweather', serif;
    text-align: center;
    width: auto;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="banner"&gt;
    &lt;img class="banner-img" alt="banner image" src="images/banner.jpg"&gt;
    &lt;div class="banner-text"&gt;Hello, Welcome To My Portfolio!
      &lt;p&gt;I'm Nicholas!&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>