title: Responsive triangle div
body: <p>I'm trying to create a <strong>responsive triangle div</strong> which will sit at the top of the page as a header.</p>
  
  <p>I was able to achieve that with the following  code:</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>div{
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 200px 400px 0 0;
    border-color: #007bff transparent transparent transparent;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>The problem is that I want this triangle to be <strong>responsive to the width of the page</strong> and change proportionally in height as well.</p>
  
  <p>I tried setting width and height to percent based, however that produced a really small triangle which you can see here:</p>
  
  <p><a href="http://jsfiddle.net/Ltbzkq0e/1/" rel="nofollow">http://jsfiddle.net/Ltbzkq0e/1/</a></p>
  
  <p>How to make the borders work with percent without having to use webkits?  Is that possible, if not how do I achieve this effect with webkits?</p>
  
  <p>EDIT:</p>
  
  <p>I would also like to fit content in this div.  At the moment the only way I can think of is to use absolute positioning and set height to -20px, etc...  Is there a better way of accomplishing this?</p>