title: Make border width a half of its parent's height element using css?
body: <p>Here is I want to do:</p>
  
  <p><img src="https://i.stack.imgur.com/2BArs.png" alt="outerDiv and innerDiv"></p>
  
  <p>I'm making an shape(triangle) using css border property with 0px height &amp; width. The shape should be same height as its parent. It's parent height is unknown and varying. How can this accomplish with the use of css.(without using Javascript)</p>
  
  <p>I also tried to use percentages ( border-width: 50%; )</p>
  
  <p>Here is the code but it is not required!</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;&lt;/title&gt;
      &lt;style type="text/css"&gt;
          html, body {
              height: 100%;
          }
          body {
              display: flex;
              justify-content: center;
              align-items: center;
          }
          body &gt; div {
              border: 2px solid blue;
              width: 400px;
              height: 70px;/* unknownHeight = 70px */
              display: flex;
              flex-direction: row;
          }
          .shape {
  
              border-width: 35px; /* unknownHeight/2 = 35px */
              border-style: solid;
  
              border-top-color: transparent;
              border-right-color: transparent;
              border-bottom-color: red;
              border-left-color: red;
          }
          .stableDiv {
              flex: 1;
          }
      &lt;/style&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
      &lt;div&gt;
          &lt;div class="stableDiv"&gt;&lt;/div&gt;
          &lt;div class="shape"&gt;&lt;/div&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>