title: CSS Cut out circle from a rectangular shape
body: <p>I managed to achieve this effect: <a href="http://jsfiddle.net/6z3msdwf/1/" rel="nofollow">http://jsfiddle.net/6z3msdwf/1/</a> but I am not really happy with the markup. Also, there is an weird bug in IE 10/11 where a 1px gap is shown when you resize the window.</p>
  
  <p>Is there any other way to do this? Or maybe fix this one in IE.</p>
  
  <p><strong>EDIT</strong> The circle must not use a border, it should be transparent.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>body,
  html {
    font-size: 18px;
  }
  body {
    background-color: #fff
  }
  .avatar {
    width: 90px;
    height: 90px;
    position: absolute;
    background-color: red;
    top: -115px;
    left: 5px;
    border-radius: 80px;
  }
  .wrap {
    display: block;
    margin: 100px auto 0 auto;
    width: 90%;
    position: relative;
  }
  .rect-left,
  .rect-right {
    position: relative;
    width: 50%;
    height: 150px;
    float: left;
  }
  .rect-left {
    margin-left: -50px;
  }
  .rect-right {
    margin-right: -50px;
  }
  .inner {
    position: absolute;
    top: 0;
    left: 50px;
    right: 0;
    bottom: 0;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
  }
  .rect-left .inner {
    left: 50px;
    right: 0;
    -webkit-border-top-left-radius: 6px;
    -webkit-border-bottom-left-radius: 6px;
    -moz-border-radius-topleft: 6px;
    -moz-border-radius-bottomleft: 6px;
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
  }
  .rect-right .inner {
    left: 0;
    right: 50px;
    -webkit-border-top-right-radius: 6px;
    -webkit-border-bottom-right-radius: 6px;
    -moz-border-radius-topright: 6px;
    -moz-border-radius-bottomright: 6px;
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
  }
  .rect {
    float: left;
    height: 100px;
    width: 100px;
    background: rgba(0, 0, 0, 0.8);
    position: relative;
    top: 50px;
  }
  .circle {
    display: block;
    width: 100px;
    height: 50px;
    top: -50px;
    left: 0;
    overflow: hidden;
    position: absolute;
  }
  .circle:after {
    content: '';
    width: 100px;
    height: 100px;
    -moz-border-radius: 100px;
    -webkit-border-radius: 100px;
    border-radius: 100px;
    background: rgba(0, 0, 0, 0);
    position: absolute;
    top: -110px;
    left: -40px;
    border: 40px solid rgba(0, 0, 0, 0.8);
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="wrap"&gt;
    &lt;div class="rect-left"&gt;
      &lt;div class="inner"&gt;&lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="rect"&gt;&amp;nbsp;&lt;span class="circle"&gt;&lt;/span&gt;
      &lt;div class="avatar"&gt;&lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="rect-right"&gt;
      &lt;div class="inner"&gt;&lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>