title: How to round image corner inside div
body: <p>I need image with rounded bottom corners inside rounded div.</p>
  
  <p>I tried to set image border radius, but div exceeds image. Where do I make a mistake?</p>
  
  <p>Is there a way how to fix it? Or do we have better solution?
  Thank you for all answers</p>
  
  <p><a href="https://i.stack.imgur.com/tKBCk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tKBCk.png" alt="enter image description here"></a></p>
  
  <p>Here is my code</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>.mainTile{
      position: absolute;
      background-color: red;
      border-radius: 15px;
  }
  
  .mainTileHeader
  {
      width: 90%;
      margin-left: auto;
      margin-right: auto;
  }
  
  .mainTileHeader h2
  {
      text-align: center;
      margin-top: 10px;
      color: white;
      margin-bottom: 10px;
  }
  
  .mainTileImg
  {
      width: 100%;    
      -webkit-border-radius: 0 0 15px 15px;
  }
  
  .button {
      background-color: #4CAF50;
      border: none;
      color: white;
      padding: 10px;
      text-align: center;
      text-decoration: none;
      display: inline-block;
      font-size: 16px;
      margin: 4px 2px;
      border-radius: 20px;
      position: absolute;
      right: 10px;
      bottom: 10px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  
  &lt;html lang="en" xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
      &lt;meta charset="utf-8" /&gt;
      &lt;meta name="viewport" content="widht=device-width"&gt;
      &lt;title&gt;Main&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div class="mainTile" style="width: 300px;"&gt;
          &lt;div class="mainTileHeader"&gt;
              &lt;h2&gt;Header&lt;/h2&gt;
          &lt;/div&gt;
          &lt;img src="https://picsum.photos/300/?random" alt="item" class="mainTileImg"&gt;
          &lt;button class="button"&gt;xxxxx&lt;/button&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>