title: Slant the top of a div using css without skewing text
body: <p>I am trying to create a div that slants only at the top and does not skew the text within it, using CSS.
  The reason I would like for it to be CSS-only is because it is a responsive design and needs to respond to percentages, as the rest of this div flexes as the device width changes.</p>
  
  <p>A photo of what I am trying to accomplish is here: </p>
  
  <p><img src="https://i.stack.imgur.com/xVpNv.png" alt="Slanted design"></p>
  
  <p>What I have gotten so far is to create a skewed div and position it within the other div, then use a negative margin to pull it upwards. There are two issues with this way that I've done this. The first issue is that on the smallest screen shrinkage (make your browser width really small), the skewed div becomes smaller than the containing div, making it look odd. Also, this div is covering up any text I am adding after it.</p>
  
  <p>The markup:</p>
  
  <pre><code>&lt;aside&gt;
                  &lt;div id="skew"&gt;&lt;/div&gt;&lt;!-- #skew --&gt;
                  &lt;h3 id="refer"&gt;Refer Your Friends&lt;/h3&gt;
  &lt;/aside&gt;
  </code></pre>
  
  <p>The CSS:</p>
  
  <pre><code>   #skew {
  background:#00328b;
  width:103%;
  height:66px;
  border-radius:8px;
  margin-top:-47px;
  margin-left:-1.2%;
    -webkit-transform: skewY(-5.5deg); 
   -moz-transform: skewY(-5.5deg); 
    -ms-transform: skewY(-5.5deg); 
     -o-transform: skewY(-5.5deg); 
        transform: skewY(-5.5deg); 
  }
  
  .main aside {
  color: white;
  padding: 20px 10px;
  margin-top:120px;
  border-radius:8px;
  background: rgb(0,51,141); /* Old browsers */
  }
  </code></pre>
  
  <p>I have tried using the skew on the parent aside, but this skews all child elements within it. If this were a fixed layout, I would use absolute positioning to help me, but since it is responsive and flexes, I don't know what other approach to take.</p>
  
  <p>I also would like for it to be in CSS because I have other effects to add to the div, such as an outer glow using box-shadow, and a background gradient.</p>
  
  <p>I also cannot change the design.</p>
  
  <p>Any input on how to accomplish this would be great!</p>